
Here, you can see me next to the recently changed storage units, which now can interact with mine carts.
Hello everyone,
some new changes have been made to improve SKYBLOCK.SK, which I want to show you guys off today. I'm also very excited to show you a storage.sk
feature which allows players to transport and sort items now way more efficient to save some server resources.
1. Repository
https://github.com/Abwasserrohr/SKYBLOCK.SK
2. Index
- Repository
- Index
- New Features and changes
3.1 Increased performance ofbiomechanger.sk
3.2 Improved/island info
command
3.3 Added sign click support, empty slot covering & minecart storage system tostorage.sk
- Pull requests
- GitHub Account
- How to contribute
3. New Features and changes
3.1 Increased performance of biomechanger.sk
The biome changing process always hanged a little bit before it actually did anything. One problem that I have found is that there is no need to save all blocks to a local list. I can just get the number of blocks without saving it into a variable. This reduces some performance problems and increased the speed of the process by around 0.25 seconds for each biome changing process for a 200x200 blocks island.
Pull request: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/224
3.2 Improved /island info
command
The /island info
command has used the chat as some other commands like the /island top
command. While it was pretty nice to get the data into the chat to view it later on by scrolling, but it makes sense to change that because these chat messages aren't meant to be used for that and rather only for chatting with other users.
That is why I have now improved the /island info
command by using books. Books have the advantage to be very clear and detailed at the same time. Also, it is possible to create clickable and hover events into these books, which allows players to open /island top
and click on an island within this list to get then redirected to the /island info <player>
command, which is also a book. This consistent menu flow is an improvement to the overall look of SKYBLOCK.SK, since it looks way more professional to display the data in a book.
Here is a video of the new improved /island info
command:
Pull request: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/225
3.3 Added sign click support, empty slot covering & minecart storage system to storage.sk
There have been some changes to the storage units I'm really excited to show you guys today because some of these can be a real game changer for storage units, storing and sorting items.
Added sign click support:
The first change is a little one. If a player clicks on the storage unit statistic sign, the storage unit is going to be opened, before, the user had to click on the storage unit itself, which has now been changed.Empty slot covering:
There have been some empty slots in the storage unit menu, which allowed players to lose some items by placing them into there. This now has been fixed, there are some glass items in the menu which prevent any items from being put into these empty slots.Minecart storage system:
Now that is why I'm excited! =) This new system allows players to set up some really big and advanced sorting and storage solutions with not very much space requirements and also less server hardware.
Some people might know how big sorting machines in Minecraft can look like but to say it for people who never seen these: It can get really messy and resource intensive for the server.
To protect servers from having these problems with big sorting machines, the Idea of making a sorting mechanism right into the storage unit has been though over. In the end, I decided to put this new feature into the storage unit add-on, which, of course, can also be configured and disabled, if the server operator doesn't want to use these lightweight sorting mechanisms.
Here is how it works:
org.bukkit.event.vehicle.VehicleMoveEvent
is needed as an event to be used. This always happens if a vehicle is moving somewhere.
This event gets always executed once a mine cart is moving and then checks if the feature is disabled by the server operator. Then, it checks if the block below the mine cart is the event trigger block. If it is the event trigger block, then there should be a storage unit status sign with contains some specific and predefined text below the trigger block, which is why there are some of these option variables.
Then, there is some mine cart storage unit fill and empty mechanisms going on below.
Here are multiple things that happen, here is a short list to explain what is happening above:
- The metadata value "lastblock" has to be another value than the current location, this prevents the storage unit to fill and empty multiple times per block.
- If the metadata value "lastblock" is another value than the current location, the current location is set to the "lastblock" value to prevent repeating itself multiple times.
- Get the storage unit item as a variable and check if it is not air, we don't want to build an air compressor so we only go forward if there is no air...
- Then, we have to be sure that the player wants to fill stuff from the mine cart into the storage unit. There are two modes, the storage unit can either be filled or emptied out. This part is responsible for the storage unit fill mode.
- Once that is done, it takes the current amount which is stored in the storage unit and then parses it as an integer.
- The amount of items, which match with the storage unit items is added to the current amount, which is later saved back to the storage unit.
- All items which match with the storage unit items get removed out of the mine cart.
Later, there is an update process which updates the storage unit and storage unit status signs. While this looks like a big process, it is way more efficient than simple old hopper sorting machines.
To show off how it works, here is a Video:
Pull request: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/229
4. Pull requests
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/224
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/225
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/229
5. GitHub Account
https://github.com/Abwasserrohr
6. How to contribute
If you want to contribute to SKYBLOCK.SK, contact me here in the comments or on Discord. Please contact me directly, I'm the sewage pipe on Discord. I look forward to meeting people who want to get in touch with Skript and Minecraft.
If you never had anything to do with programming, SKYBLOCK.SK could be a great way to start. Skript is easy to learn and gives you the opportunity to understand how things work and also get the idea behind object-oriented languages, like Java while playing a game.
Discord: https://discord.gg/FRuK5BC
Thank you for reading my contribution post.
These changes seem to be well accepted by the players on my test server. The new mine cart transport and sorting features are already used by some players and they seem to like it. Making everything less spammy for the chat is another thing that has been requested for some time now and it is getting better and better over time. =)
If you have a new idea for SKYBLOCK.SK, feedback about this contribution post, features I showed today or something else about SKYBLOCK.SK, feel free to share it with me here in the comments, on GitHub or on Discord.
Have a nice day and a great week