STEEM.CRAFT | #2 | Added multiworld support, teleport signs & loading bar

in utopian-io •  6 years ago  (edited)

Hello, Steemians and Minecraft players,

today, I have new features and changes in STEEM.CRAFT to show off. This time, further improvements and features have been added to the steemworlds addon, which allows players to store worlds on the Steem Blockchain.

1. Repository

https://github.com/Abwasserrohr/STEEM.CRAFT

2. Index

  1. Repository
  2. Index
  3. New features and changes
    3.1 New steemworlds are now super flat
    3.2 Added multi-world support
    3.3 Added bossbar based loading bar
    3.4 Added teleport signs
    3.5 Worlds are now created with less lag
    3.6 Custom JSON of steemworld comments is now compressed
  4. Pull requests
  5. GitHub Account
  6. How to contribute

3. New features and changes

3.1 New steemworlds are now super flat

Previously, steemworlds were created in a flat world, which not only had a one-floor layer but a 4-layer-floor out of bedrock, dirt, and grass. Now, the generator has been changed to only generate a 1 layer super flat world out of grass blocks. This will decrease the world size by default since there are fewer blocks from the beginning to store.

To show off the difference of this change, here is an image:
prevnow.jpg

The world generator can be modified using JSON, I really had to dig down into the Minecraft Wiki to find how it works exactly. I couldn't find a version in English.

While the customized world will no longer be available on new versions, I used the flat world with changed generator settings.

Changing the generator settings is easy, once it is clear how to use it. Here is a example how to create a superflat world with the world type "flat":

{"biome":"minecraft:plains","layers":[{"block":"minecraft:grass_block","height":1}],structures:{"village":{}}}

The JSON string which has been saved to a variable can then be used to set the generator settings. As you can see in the image below.

worldcreator.png

I used this instead of a custom generator plugin as it is directly integrated into Minecraft and might be faster than adding a custom layer on top and it is just easier to implement for me.

Currently, these settings are fixed, but once players get the chance to customize their world, the JSON might be generated using jackson.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/10

3.2 Added multi-world support

In the first version of the steemworlds addon, players were only able to make one single world. This is now changed. Players can now create, load and save as many worlds as they wish. This is important as one world is just not enough, because these worlds are limited in size.

Multiple smaller features have been added to allow the multi-world support to work. A normalize function for text has been added and a check to ensure that worlds do exist before loading. Also, some smaller changes have been made. You can see multiple worlds working below in a video.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/10
Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/8

3.3 Added bossbar based loading bar

In my opinion, loading bars are always better than simply nothing, as these can visualize the progress of a work step very good. This is also possible in Minecraft with the bossbar. It is used here to make the world loading and saving a better experience.

The bossbar tells the player what is currently done in the background and also shows the progress directly, which is good to understand why something might take some time. It also shows how fast things work, that way, people hopefully don't forget about the process in the background, which has to be done to show a world.

Here is a video of how it looks like, you can see the bossbar on the very top of the video.

I personally really prefer such loading bars instead of just having a message telling me "Loading...". What do you think about loading bars? :)

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/14
Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/15

3.4 Added teleport signs

Now with multiple worlds, some people might wonder. How can I find all the worlds people have been building? Currently, there is no way of getting any information about that, while there might be some ways in the future to get some quality buildings and worlds, people can be visited using /visit <steem username>. People will automatically visit the world named "home" by the defined user.

There, people could add teleport signs to their worlds. This is like a hub world to any other world they prefer. By setting the sign, they can add a teleport to any world which has been saved to the Steem Blockchain. This is very useful for people who build many things and need a place to show all their cool stuff to others.

Here is a video that shows these teleport signs:

Because people could add some non-existing worlds, a check is applied once a sign is placed to check if the world is actually stored on the Steem Blockchain. For this, the getSteemContent("author","permlink") function is used, which returns the content of the world.

tpsign1.png

Here, the content is loaded from the Steem Blockchain, then, it checks the name of the author. If the author is set, we can be sure that something is stored there. While we're not sure if it is a Minecraft world, there might be a function added soon which can check loaded Steem content for being a valid steemworld or not.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/13

3.5 Worlds are now created with less lag

By triggering the WorldInitEvent event from Bukkit, it is possible to change the setting of the world before it actually loads. This is very useful to change settings which impact performance.

Here, the KeepSpawnInMemory setting of the loaded world is set to false, if the world contains steemworlds- in the name.

initevent.png

Thanks to this little event, world loading of steemworlds will not hang the server, since it will not try to load everything instantly but slowly once a player joins the world.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/10/files#diff-92eb7f1e79c40f06f8d0157b417c66e9R632

3.6 Custom JSON of steemworld comments is now compressed

While comments can be really big on Steem, big worlds hopefully will never hit the capacity of the comments. But to reduce the size furthermore, the custom JSON part for the steemworlds has been compressed and encoded to base64 to reduce the size.

Instead of having a JSON like this:

{"app":"STEEM.CRAFT","format":"markdown","world":[{"x":-1,"z":-1,"i":1,"b":"33160294"},{"x":-1,"z":0,"i":1,"b":"33160303"},{"x":-1,"z":-1,"i":2,"b":"33160301"},{"x":0,"z":-1,"i":1,"b":"33160314"},{"x":-1,"z":0,"i":2,"b":"33160308"},{"x":0,"z":0,"i":1,"b":"33160322"},{"x":0,"z":-1,"i":2,"b":"33160316"},{"x":0,"z":0,"i":2,"b":"33160324"}]}

The "world" part of the JSON is now compressed, like this:

{"app":"STEEM.CRAFT","format":"markdown","world":"H4sIAAAAAAAAAFt7oH55fVXCx+z6lRCqs74KSDbVV9V//vz54/fPn37WX8jGougzsqLPn7Ar+oSi6ANM0Qectn3+hmbQByxqvqKa8wGLVT+xKUE15Uf9hb0AVXcV+/4AAAA="}

If you look at the size of both code parts, you already can recognize a smaller size on the compressed world comment, which is why this has been added.

Pull request: https://github.com/Abwasserrohr/STEEM.CRAFT/pull/3

4. Pull requests

https://github.com/Abwasserrohr/STEEM.CRAFT/pull/3
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/4
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/8
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/9
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/10
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/11
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/12
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/13
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/14
https://github.com/Abwasserrohr/STEEM.CRAFT/pull/15


5. GitHub Account

https://github.com/Abwasserrohr


6. How to contribute

If you want to contribute to STEEM.CRAFT, 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.
Of course, you can also start forking STEEM.CRAFT, creating pull requests and improve it without contacting me.

Discord: https://discord.gg/FRuK5BC


Thank you for reading my contribution post.

These changes will help people to connect their worlds together, make groups and galleries of different worlds for special types of buildings. Communities can build their own hub worlds and refer to cool stuff made by their members.

Professional builders can show references for their buildings too. I've been really excited to add the loading bars to the steemworlds addon, as it gives me an overview of the current progress, which is nice to have, in my opinion.

The super flat worlds will decrease the size of the worlds and also reduce the bandwidth needed for players, this might reduce the resource credits bandwidth so much that even free claimed Steem accounts may broadcast Minecraft worlds to the Steem Blockchain.

Have a great Thursday, Friday and a nice weekend,

@immanuel94

STEEM.CRAFT IS NOT A OFFICIAL MINECRAFT PRODUCT.
NOT APPROVED BY OR ASSOCIATED WITH MOJANG.

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 as usual, full of images, videos, code samples and explanations of coding choices.
  • Great commit messages and code comments, wow!
  • Steem integration and optimisation is very exciting.

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. =)

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

Hammer Projekt. Muss das in Kürze mal ausprobieren, aber es sieht echt gut aus!

Danke für dein Feedback! ;)

Wenn du Fragen hast, kann ich dir gerne weiterhelfen.

Die neuen Features sind sehr praktisch =D

Ja, finde ich auch! :3

test

Der Test hat funktioniert. ;) Willkommen auf Steem.^^

ich finde es gut weil man mehre bauten bauen

Genau, das dachte ich mir auch. ;)

ja is schon schön weil man seiner kreativität nun einen noch freieren Lauf lassen kann und nicht an den Platz von nur einem GS gebunden ist

Genau, jetzt hat man richtig viel Platz, alles mögliche zu bauen, bald auch mit größeren Welten als jetzt. ^^

Das ist ein echt nices Feature!

Vielleicht mache ich auch mal einen Bauwettbewerb mit Steem.Craft. =) 👍

Cobbel4life #Skyroadistcool GIB MIR JETZT DEN SBI

Die Verlosung unter allen Feedback Teilnehmern findet gleich statt. :)

Hi @immanuel94!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 3.328 which ranks you at #7334 across all Steem accounts.
Your rank has dropped 25 places in the last three days (old rank 7309).

In our last Algorithmic Curation Round, consisting of 200 contributions, your post is ranked at #48.

Evaluation of your UA score:
  • You're on the right track, try to gather more followers.
  • The readers appreciate your great work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

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!

lol