[Open Source] SkyBlock Minecraft Addon [New features & bug fixes]
utopian-io·@immanuel94·
0.000 HBD[Open Source] SkyBlock Minecraft Addon [New features & bug fixes]
Hello there steemians and minecraft players, i have added some new features and fixed bugs on SKYBLOCK.SK, a fully customizable skyblock experience in minecraft without having to know Java for server operators to use. Licenced under the MIT licence to use for everyone. #### Repository https://github.com/Abwasserrohr/SKYBLOCK.SK --- ### Bug Fixes - **Player gets damage on join** This happens because the player is being teleported to his island while joining the server. Since there could be changes to the world and the island while the player is offline, he is teleported back. But because the player is flying while being teleported, he gets damage for falling from somewhere above, which not only damages the player, but also makes him hungry. A first approach to give the player a resistance effect, which is included in minecraft didn't work out because it makes the player hungry on join, even with the resistance effect. - **Solution** To fix this issue, i now give the player a new variable {SB::invincible::%player%} which is set to 1 and deleted after 5 seconds of being in the game. This way, we have a set variable for 5 seconds after the player joined. No matter what is happening, the player has 5 seconds time and is not getting damage by anything. Also fall damage is canceled. Since we can check at the trigger "on damage", if there is a variable set to the name of the victim: {SB::invincible::%victim%}, if so, the damage is canceled. - **Link to this fix** In older versions of minecraft, i never had this type of damage on join using teleportation, this might be a new feature in the new minecraft 1.13 and thats why i might not added it in the first place. I used to do teleportation elsewhere on minecraft 1.12 without damage to the player. Here is the pull request for it: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/23 --- - **Every island owner can kick island members, also from other islands** As an owner of an island, it was possible to kick every other member of any island. Usually, only the owner of his island should be able to kick the member of his own island, of course... =D - **Solution** There was an incorrect variable, which has been used to get the bedrock of the island, where member variable is saved. The {_uuid} contains the uuid of the kicked player: {SB::player::%{_uuid}%::island::bedrock}. It should not contain the uuid of the kicked player, but the uuid of the owner, who wants to kick someone. Then, everything works fine, since it now no longer finds the member on his island. I also comment the code more if i get to a code to change anything. - **Link to this fix** But have to say, that I made the mistake in the first place, this is also a reminder for myself to be more careful when it comes to critical stuff like kicking someone from an island. https://github.com/Abwasserrohr/SKYBLOCK.SK/commit/be45f633492458fec0206b71c1427e5b61bb16ce --- - **Breaking blocks is always possible, as long as the player is on his island** If a player is on his island, he can always break and place blocks, no matter if it is his island or not. I have fixed the bug yesterday with THEloligLP, who reported the bug to me in the game. <center> <a href="https://i.imgur.com/DVYlNKk.png"><img src="https://i.imgur.com/DVYlNKk.png"/></a> </center> - **Solution** This is also an error which could have been avoided, since it should check the event-block at the break and place event instead of the event-entitiy. - **Link to this fix** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/30/commits/70b5f8b7d50fdf8037a8ef1045ac7d57392267e2 --- ### New Features ##### **New function "searchbedrock":** Since all the data about the island is stored in variables named by the location of the bedrock (the center point of the island), it is useful to have a function to search for the bedrock that is near the player. The implementation works similar to the creation process, but is changed and I also commented it to make it easier to understand by detailed comments about the process. The functions searches and tries to find the bedrock of the island the player is currently on, it needs the player for the location to find it. Once fired with the player as variable passed into the function, it loops through all available islands on the server by calculating the next island center. This is done in a 2 dimensional way with x and z axis like in the picture: <center> <a href="https://cdn.steemitimages.com/DQmduJ4pJum9ExonqWbySSRQjzHyVbmP1GCJUcJqum8jYjL/searchis.png"><img src="https://cdn.steemitimages.com/DQmduJ4pJum9ExonqWbySSRQjzHyVbmP1GCJUcJqum8jYjL/searchis.png"/></a> </center> As in the picture shown, THEloligLP entered /is info (which is also a new feature I show, below), the function searches on which island he is on by calculating the location and comparing them with his current location. Maybe this also could be done by reverse with better mathematical skills i don't have. In the future, maybe! =) If found, it returns the location of the bedrock, the player is standing on (or on the same island as the bedrock). If it didn't find anything, it stops as soon as it has looped trough more islands than there are existing and returns a location with a y axis of -5, since we have to predefine what the function is returning in the first place, a return false is not possible. ##### **Here is the link to the change**: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/30/commits/c99c97758bed5e0c1004a1ece606a1918a05984c --- ##### **New argument to the /island command** Now, thanks to the new searchbedrock function, we can search for the bedrock of the island, on which the player is currently staying on. ``` else if arg-1 is "info": set {_bedrock} to searchbedrock(player) if y-coordinate of {_bedrock} is -5: message "%{SB::config::spacer}%" message "%{_prefix}% %{SB::lang::isinfonotfound::%{SK::lang::%uuid of player%}%}%" message "%{SB::config::spacer}%" else: set {_loc::1} to x-coord of {_bedrock} set {_loc::2} to y-coord of {_bedrock} set {_loc::3} to z-coord of {_bedrock} set {_uuid} to {SB::island::%{_loc::1}%_%{_loc::2}%_%{_loc::3}%::leader} parsed as offline player set {_level} to {SB::island::%{_loc::1}%_%{_loc::2}%_%{_loc::3}%::level} set {_exp} to {SB::island::%{_loc::1}%_%{_loc::2}%_%{_loc::3}%::exp} set {_created} to {SB::island::%{_loc::1}%_%{_loc::2}%_%{_loc::3}%::created} loop {SB::island::%{_loc::1}%_%{_loc::2}%_%{_loc::3}%::member::*}: add "%loop-value%" parsed as offline player to {_member::*} message "%{SB::config::spacer}%" message "%{_prefix}% %{SB::lang::isinfo::%{SK::lang::%uuid of player%}%}%" message "%{_prefix}% %{SB::lang::isleader::%{SK::lang::%uuid of player%}%}% %{_uuid}%" if size of {_member::*} is not 0: message "%{_prefix}% %{SB::lang::ismember::%{SK::lang::%uuid of player%}%}% %{_member::*}%" message "%{_prefix}% %{SB::lang::isinfolevel::%{SK::lang::%uuid of player%}%}% %{_level}%" message "%{_prefix}% %{SB::lang::iscreated::%{SK::lang::%uuid of player%}%}% %{_created}%" message "%{SB::config::spacer}%" ``` As you can see above, if the player types in /is and then the first argument "info", the searchbedrock function is used to get the bedrock of the island, he is staying on, if the returned location has not a y axis of -5, it is ok and being used. It then takes the location and makes 3 local {_loc::*} variables, which contain the x, y and z axis of the bedrock. With these, we can get the information located in the variables of the island, they contain the leader, island level, experience, creation date and the members of the island. Once the data is saved in local variables, they then get printed out with a message. It also is going to check if there are members on the island or not, if no members are on the island, it is not going to print a empty member line. For what is this helpful? For example, I want to know where i am, with /is info I can get instantly, where I am and who is a member of this island. Also a level is displayed and is handy for competition purposes. ##### **You can find the change here:** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/30/commits/862ffb1f46c2a84673dc5fdf9596fc344a1c00af --- ##### **Obsidian2Lava now informs players about its functionality** If a player starts with skyblock, most of the time, players have a problem with creating a proper cobblestone generator, many times, the lava is going to end as obsidian. If there is no solution to this, the player would either leave the server or delete the island and start from scratch. Obsidian2Lava fixes this by allowing the player to revert obsidian back to lava. This was already included in the first commits, but it now informs the player, if his lava is formed into an obsidian block by searching trough, if someone is near the event location and if this is the case, inform the player about it to prevent island delete or players leaving the server: ``` on block form of obsidian: $ thread loop all players: if distance between loop-player and event-location < 30: send "%{SB::lang::prefix::%{SK::lang::%loop-value%}%}% %{SB::lang::o2lforminfo::%{SK::lang::%loop-value%}%}%" to loop-player ``` ##### **You can find the change here**: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/30/commits/5feb15d126306705f7d58cd20ce26964889a4e08 ##### **Configurable color scheme** I'm used to be a server operator for a minecraft server and the color choices by developers annoyed me sometimes. I don't want to annoy others with my color opinions, that is why it is now possible to change the color scheme like needed, this saves a lot of time. Since only 4 variables change the entire look of the skript: ``` set {SB::config::color::primary::1} to "&6" set {SB::config::color::primary::2} to "&e" set {SB::config::color::secondary::1} to "&7" set {SB::config::color::background::1} to "&8" ``` This is the default and it looks like this in action: <center> <a href="https://i.imgur.com/VIO96bx.png"><img src="https://i.imgur.com/VIO96bx.png"/></a> </center> This allows to change the colors to the corporate design and logo and make it fit well on every server. --- This is all I have for this time, it really took longer than expected to find the bugs and get the searchbedrock function working properly and without slowdown. Also adding these comments to the searchbedrock function took time, but it is now easier to understand what it does. =D You can find them in the pull request linked below. --- #### Pull requests https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/30 https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/27 https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/23 --- #### GitHub Account https://github.com/Abwasserrohr --- #### How to contribute I'm looking forward to find more people interested in using skript to make it easier for server operators to change everything like they want without knowing Java in the future. You can get in touch with me on [Discord](https://discord.gg/FRuK5BC) or create a pull requests right away. I also want to make some tutorials, how to create your own first skript and the basics without any knowledge about coding at all in the future. It also can help you to understand how coding works in general by playing minecraft with skript. If you're interested, no matter if you're a coder or new to coding, i'll help you to set up everything you need to start your own skript on [Discord](https://discord.gg/FRuK5BC). --- Thanks for reading, if you have feedback, i really appreciate comments on what should be changed. Also positive feedback of course. =) Keep on steeming @immanuel94
👍 steempowerplant, eduard999, dreadfulfilk, weegel, accepttransition, lackingtalent, bitok.xyz, nfc, accelerator, steemtaker, effofex, leir, eforucom, amosbastian, jaff8, asaj, merlin7, codingdefined, hakancelik, mcfarhat, acknowledgement, grewin455, ollitheone, scipio, teamcr, magpielover, pompe72, helo, miniature-tiger, warofcraft, mightypanda, bullinachinashop, delabo, simplymike, fel1xw, steemsig, glitterbot, dpoll.economy, spotted, minnowsmith, smartcurator, gattino, remotehorst23, suntree, utopian-io, jga, soyyotuber, rikaz87, steem-ua, wehmoen, wandairawan, bozz,