SkyBlock Minecraft Addon #23 - Improved commands & storage.sk now supports mine cart transportation and sorting

in utopian-io •  6 years ago  (edited)
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

  1. Repository
  2. Index
  3. New Features and changes
    3.1 Increased performance of biomechanger.sk
    3.2 Improved /island info command
    3.3 Added sign click support, empty slot covering & minecart storage system to storage.sk
  4. Pull requests
  5. GitHub Account
  6. 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:

  1. 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.
  2. 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.
  3. 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...
  4. 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.
  5. Once that is done, it takes the current amount which is stored in the storage unit and then parses it as an integer.
  6. 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.
  7. 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

@immanuel94

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  • Great article with many videos, images and code samples.
  • A little less code than usual but as much comments as before.
  • Keep up the great work.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for reviewing my contribution post! =)

Yeah, this time, there were new features that didn't require that much of a changes in the code. But in the future, there are coming some bigger features again which require a lot of new code to be done to work. :3

Thank you for your review, @helo! Keep up the good work!

Durch die neue Möglichkeit Iteams voll Automatisch zu sortieren kann man sich sehr viel Arbeit ersparen. =P

Ja, da hast du recht. Das ging ja auch schon vorher. Aber so spart man sich viele Trichter, was ja auch Ressourcen spart.. ^^

  ·  6 years ago (edited)

Die alte System war aber recht Fehler anfällig, deswegen habe ich es auch nicht gebaut. =D

Ja, das habe ich auch schon gehört. Naja, dann ist ja gut, dass es nun das Feature gibt.. :P

Auf jeden Fall^^

Die neuen Features sind sehr nützlich und machen verschiedene farmen einfacher

Freut mich, dass dir die neuen Features gefallen und es dir leichter machen.^^

Gute neue Features! Danke an das SB-Team. :)

Super, dass dir die neuen Features soweit gefallen!^^ Wenn du Ideen hast, melde dich gerne. ;)

ich finde die neuen featchers in SkyBlock super

Spitze, tolle Arbeit! <3

Vielen Dank! =) Freut mich, dass dir das Projekt soweit gefällt.^^

Congratulations! Your post has been selected as a daily Steemit truffle! It is listed on rank 1 of all contributions awarded today. You can find the TOP DAILY TRUFFLE PICKS HERE.

I upvoted your contribution because to my mind your post is at least 10 SBD worth and should receive 137 votes. It's now up to the lovely Steemit community to make this come true.

I am TrufflePig, an Artificial Intelligence Bot that helps minnows and content curators using Machine Learning. If you are curious how I select content, you can find an explanation here!

Have a nice day and sincerely yours,
trufflepig
TrufflePig

Hi @immanuel94!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @immanuel94! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 25000 upvotes. Your next target is to reach 30000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

3 years on Steem - The distribution of commemorative badges has begun!
Happy Birthday! The Steem blockchain is running for 3 years.
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Hey, @immanuel94!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!