create account

[Open Source] SkyBlock Minecraft Addon [New features #8] by immanuel94

View this thread on: hive.blogpeakd.comecency.com
· @immanuel94 · (edited)
$47.02
[Open Source] SkyBlock Minecraft Addon [New features #8]
<div><center><a href="https://cdn.steemitimages.com/DQmNVfqAwgi4aQ4YP2Jv16KGtV26t65k8Vg5Hb2d1GevwRU/2019-01-03_16.32.38.png"><img src="https://cdn.steemitimages.com/DQmNVfqAwgi4aQ4YP2Jv16KGtV26t65k8Vg5Hb2d1GevwRU/2019-01-03_16.32.38.png"/></a></center><code>A island with the new progress bar for /island calc</code></div>


---

Hello steemians and minecraft players,

I want to wish everyone a happy new year and good luck with everything you want to accomplish. Today, I want to share some new changes to the SKYROAD.SK game add-on to Minecraft, which is licenced under the MIT licence.


###  1. Repository
https://github.com/Abwasserrohr/SKYBLOCK.SK



###  2. Index
1. Repository
2. Index
3. New Features and changes
3.1. Added lava buckets and obsidian to island bound items
3.2. Outsource admin commands into functions 
3.3. Generate the structure file folders in the world
3.4. Added progressing loading bar to ```calcisland``` function
3.5. Added ```admintools_create``` function
4. Pull requests
5. GitHub Account
6. How to contribute


###  3. New Features
####  3.1. Added lava buckets and obsidian to island bound items
<div class="pull-right"><a href="https://cdn.steemitimages.com/DQmYiLJVaJF1MTraCVhLaFqnJrbWKRgtBAUFMYc4EGeFjLD/2019-01-03_16.34.42.png"><img src="https://cdn.steemitimages.com/DQmYiLJVaJF1MTraCVhLaFqnJrbWKRgtBAUFMYc4EGeFjLD/2019-01-03_16.34.42.png"/></a>
<code>Lava buckets are now also bound to the island.</code>
</div>

In the last couple of days, the island bound dirt, grass and farmland has been introduced. Since people had no longer the chance to gain profit from this, they have seen that lava buckets and also obsidian is still possible to share. With this change, it is no longer possible for players to pick up lava from new islands and place it on other islands. This prevents now, that players join with alt accounts and loot the island faucet by creating an island, taking the lava and then deleting the island to repeat the process over and over.

Since we already had the ```binddirt``` function, I renamed this function into ```binditem``` and changed it. Instead of only binding dirt, it can now bind everything we want to the island. Also lava, lava buckets and obsidian.

Here is how the new function can be called. This is also how lava is now bound to the island:

```
on bucket fill:
	if target block is lava:
		set {_allowed} to checkislandaccess(player,event-location)
		if {_allowed} is not false:
			cancel event
			binditem(event-location, player,lava bucket)
```
If the player fills his bucket while looking at lava, the player is going to fill the lava into his bucket.
Since we want to prevent vanilla behaviour, we check first, if this is allowed by calling the ```checkislandaccess``` function, which returns a Boolean and if it is not false, cancel it and bind it using ```binditem```.

Now, we have an island bound bucket of lava, which we can check on the bucket empty event like this:

```
on bucket empty:
	if player's tool is lava bucket:
		set {_allowed} to checkislandaccess(player,event-location)
		if {_allowed} is not false:
			set {_allowed} to bindcheck(player's tool, player)
			if {_allowed} is false:
				cancel event
```
Here, we again check if the player wants to empty a bucket of lava and check, if the player is allowed to do so. If the player is allowed, we use the ```bindcheck``` function to check the current tool of the player (the bucket of lava).  ```bindcheck``` is going to return false if the lava bucket is bound to another island.

The pull request also added grass paths to the island bound protection, which I forgot as I added the ```binddirt``` function.

Pull request: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/65

####  3.2. Outsource admin commands into functions

Reducing the size of the Events.sk and Commands.sk files and adding more functions to the game to also allow server operators to use these functions for themselves how they want is on the roadmap of SKYBLOCK.SK, this also makes the code easier to read and later much easier to change things.
With this change, all bigger code parts of ```/islandadmin``` have been seperated into multiple functions and relocated into ```SkyBlock/SKYBLOCK.SK/Functions/admintools.sk```. This reduced the line size of Commands.sk by around 338 lines.

I also made the following change for arguments, which called the ```warphandler``` and ```homehandler``` functions:

```
		else if arg-1 is "warp":
			warphandler(player,"warp",arg-2)
		else if arg-1 is "setwarp":
			warphandler(player,"setwarp",arg-2)
		else if arg-1 is "delwarp":
			warphandler(player,"delwarp",arg-2)
```
Instead of calling the ```warphandler``` for all the different arguments, it is now more compact, since we can check multiple arguments at once, we know that the argument is correct and can passed as a parameter to the ```warphandler```.
```
 		else if arg-1 is "warp" or "setwarp" or "delwarp":
			warphandler(player,arg-1,arg-2)
```

**Pull request:** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/67


####  3.3. Generate the structure file folders in the world

Minecraft doesn't create the structure file folders by default. Only if someone on the server decides to create a structure, this folder is created. At the moment where I created the ```loadislandstoworld``` function, I didn't know about that. While testing for the first releases in the future, I found this issue, which is now fixed.

This is only one line, if the folder is already there, there is no error going to be outputted in the logs, since I catch the error using the ```try``` before the actual code.

```
 try new File("%{SB::config::world}%/generated/minecraft/structures/").mkdirs()
```

**Pull request:** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/69

### 3.4. Added progressing loading bar to ```calcisland``` function
<div class="pull-right"><a href="https://cdn.steemitimages.com/DQmVELubAky8g4gXw3uqr32SjynuZ8UHEy7f3YZgCfYiDxn/ezgif-1-97ac3b419192.gif"><img src="https://cdn.steemitimages.com/DQmVELubAky8g4gXw3uqr32SjynuZ8UHEy7f3YZgCfYiDxn/ezgif-1-97ac3b419192.gif"/></a>
<code>Progress of the new progress bar for island calculation.</code>
</div>
Some players experienced endless loading bars while using the ```calcisland``` function. I never really had opportunity to get it reproduced on my side. I changed the progressing bar to now show actual progress. This way, the player knows how far it got and sees directly how much progress has been made.
This process is calculated by knowing how many blocks we have on the island and then checking on how many blocks we already have gone through.

That way, we can inform the player, how many blocks we already got and then also make a nice looking progress bar, which changes colours as the progress goes on.

I did it the following way:

```
 set {_progress} to "%{SB::config::color::secondary::2}%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||&r"
```
We have a progress bar, which contains ```|``` 100 times. Since it is coloured like the secondary 2 colour, configured in the ```config.sk```, we can change the colour of one ```|```, once we have progressed 1 percent further than before.

```
 replace all "%{SB::config::color::secondary::2}%|" with "%{SB::config::color::primary::1}%|%{SB::config::color::secondary::2}%" in {_progress}
```
By replacing some colour variables, we now have a progress bar, which looks like in the gif. Players also like that the block counter is so fast and they now can view the progress going on. =)

**Pull request:** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/71

### 3.5. Added ```admintools_create``` function

Now, finally, the admin can create new and empty islands anywhere needed. If someone want to get a specific neighbour, it is now possible to create the island at the right place and copy the island over and then re-adding the players to this island. Many people on my test server asked for this, I hope they now want to move to other places. =D

**Pull request:** https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/74


### 4. Pull requests
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/65
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/67
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/69
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/71
https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/74

### 5. GitHub Account
https://github.com/Abwasserrohr

### 6. How to contribute
If you want to contribute to SKYBLOCK.SK, you can contact me using Discord or create a pull requests directly on GitHub, I'm looking forward to meet you. I'm Abwasserrohr on the Discord. =)

Discord: https://discord.gg/FRuK5BC

---

Thank you for reading this contribution post. If you have feedback, I'm looking forward to hear about it. ^^
This time, some very frequently asked features, like the progress bar for ```/island calc``` and the new island creation function where added. I'm glad that this is done, since people have been asking all the time for stuff like this. =D

Keep on steeming and I wish you a successful new year

@immanuel94
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 2 others
properties (23)
authorimmanuel94
permlinkopen-source-skyblock-minecraft-addon-new-features-8
categoryutopian-io
json_metadata{"tags":["utopian-io","development","minecraft","skyblock","skript"],"app":"steemit/0.1","users":["immanuel94"],"image":["https://cdn.steemitimages.com/DQmNVfqAwgi4aQ4YP2Jv16KGtV26t65k8Vg5Hb2d1GevwRU/2019-01-03_16.32.38.png","https://cdn.steemitimages.com/DQmYiLJVaJF1MTraCVhLaFqnJrbWKRgtBAUFMYc4EGeFjLD/2019-01-03_16.34.42.png","https://cdn.steemitimages.com/DQmVELubAky8g4gXw3uqr32SjynuZ8UHEy7f3YZgCfYiDxn/ezgif-1-97ac3b419192.gif"],"links":["https://cdn.steemitimages.com/DQmNVfqAwgi4aQ4YP2Jv16KGtV26t65k8Vg5Hb2d1GevwRU/2019-01-03_16.32.38.png","https://github.com/Abwasserrohr/SKYBLOCK.SK","https://cdn.steemitimages.com/DQmYiLJVaJF1MTraCVhLaFqnJrbWKRgtBAUFMYc4EGeFjLD/2019-01-03_16.34.42.png","https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/65","https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/67","https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/69","https://cdn.steemitimages.com/DQmVELubAky8g4gXw3uqr32SjynuZ8UHEy7f3YZgCfYiDxn/ezgif-1-97ac3b419192.gif","https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/71","https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/74","https://github.com/Abwasserrohr","https://discord.gg/FRuK5BC"],"format":"markdown"}
created2019-01-03 15:51:15
last_update2019-01-03 15:51:54
depth0
children11
last_payout2019-01-10 15:51:15
cashout_time1969-12-31 23:59:59
total_payout_value35.145 HBD
curator_payout_value11.876 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9,126
author_reputation212,637,383,853,137
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries
0.
accountutopian.pay
weight500
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id77,816,444
net_rshares89,605,429,080,363
author_curate_reward""
vote details (66)
@ahcxes ·
Sieht echt gut aus. Viel besser als die alte Version.
properties (22)
authorahcxes
permlinkre-open-source-skyblock-minecraft-addon-new-features-8-1546537817
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","gaming"],"app":"steemcraft"}
created2019-01-03 17:50:18
last_update2019-01-03 17:50:18
depth1
children1
last_payout2019-01-10 17:50:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length53
author_reputation0
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,821,547
net_rshares0
@immanuel94 ·
Ja, vorallem sieht es weniger "ewig lang ladend" aus als vorher... =D
properties (22)
authorimmanuel94
permlinkre-ahcxes-re-open-source-skyblock-minecraft-addon-new-features-8-1546537817-20190103t175146069z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-01-03 17:51:45
last_update2019-01-03 17:51:45
depth2
children0
last_payout2019-01-10 17:51:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation212,637,383,853,137
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id77,821,586
net_rshares0
@flyerchen ·
Sieht sehr schön aus der neue Ladebalken. Vor allem kann man besser erkennen, ob der Calc hängt oder nicht.
properties (22)
authorflyerchen
permlinkre-open-source-skyblock-minecraft-addon-new-features-8-1546533424
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","gaming"],"app":"steemcraft"}
created2019-01-03 16:37:06
last_update2019-01-03 16:37:06
depth1
children1
last_payout2019-01-10 16:37:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length107
author_reputation5,540,128,662,943
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,818,528
net_rshares0
@immanuel94 ·
Ja, stimmt.^^ So können wir dann ggf. auch ermitteln, an welcher Stelle genau es gehangen hat... =)
properties (22)
authorimmanuel94
permlinkre-flyerchen-re-open-source-skyblock-minecraft-addon-new-features-8-1546533424-20190103t164443743z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-01-03 16:44:45
last_update2019-01-03 16:44:45
depth2
children0
last_payout2019-01-10 16:44:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length99
author_reputation212,637,383,853,137
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id77,818,960
net_rshares0
@helo ·
$14.40
- Great post with code samples and explanations.
- Good use of animated gifs, could have used a few more images.
- If you could switch from "tab" as spacing to two spaces, it would make the code more readable.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/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](https://review.utopian.io/result/3/1-3-1-1-2-1-1-).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
👍  , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorhelo
permlinkre-immanuel94-open-source-skyblock-minecraft-addon-new-features-8-20190103t181311439z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1-3-1-1-2-1-1-","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-01-03 18:13:12
last_update2019-01-03 18:13:12
depth1
children2
last_payout2019-01-10 18:13:12
cashout_time1969-12-31 23:59:59
total_payout_value10.862 HBD
curator_payout_value3.535 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length707
author_reputation121,547,934,535,311
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,822,417
net_rshares26,359,223,042,002
author_curate_reward""
vote details (21)
@immanuel94 ·
Hello @helo. =)

Thank you for reviewing my contribution post. Yeah, on GitHub, it is spaced way too much, I might change to spaces soon, I created a issue for that.

Until that happens, it is also possible to change the size by a get parameter like this: https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/74/files?ts=2 =)

I'm gonna add more pictures in the future, there are some new menus with language flags, challenges and other visual things coming for which I add more pictures. :3
properties (22)
authorimmanuel94
permlinkre-helo-re-immanuel94-open-source-skyblock-minecraft-addon-new-features-8-20190103t183409192z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["helo"],"links":["https://github.com/Abwasserrohr/SKYBLOCK.SK/pull/74/files?ts=2"],"app":"steemit/0.1"}
created2019-01-03 18:34:09
last_update2019-01-03 18:34:09
depth2
children0
last_payout2019-01-10 18:34:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length487
author_reputation212,637,383,853,137
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id77,823,076
net_rshares0
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-immanuel94-open-source-skyblock-minecraft-addon-new-features-8-20190103t181311439z-20190106t010649z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2019-01-06 01:06:51
last_update2019-01-06 01:06:51
depth2
children0
last_payout2019-01-13 01:06:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation152,955,367,999,756
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,937,907
net_rshares0
@jongartv ·
ich finde es cool , das Skyblock nicht so ist wie es schon 1000 mal gibt sondern einbischen einzigartig
properties (22)
authorjongartv
permlinkre-open-source-skyblock-minecraft-addon-new-features-8-1546537709
categoryutopian-io
json_metadata{"tags":["steemcraft","skyroad","gaming"],"app":"steemcraft"}
created2019-01-03 17:48:30
last_update2019-01-03 17:48:30
depth1
children1
last_payout2019-01-10 17:48:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length103
author_reputation4,965,680,100,622
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,821,482
net_rshares0
@immanuel94 ·
Freut mich, dass dir diese Version von SkyBlock gefällt.^^
properties (22)
authorimmanuel94
permlinkre-jongartv-re-open-source-skyblock-minecraft-addon-new-features-8-1546537709-20190103t175123657z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-01-03 17:51:24
last_update2019-01-03 17:51:24
depth2
children0
last_payout2019-01-10 17:51:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation212,637,383,853,137
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id77,821,569
net_rshares0
@steem-ua ·
#### 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](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-open-source-skyblock-minecraft-addon-new-features-8-20190103t185532z
categoryutopian-io
json_metadata"{"app": "beem/0.20.14"}"
created2019-01-03 18:55:33
last_update2019-01-03 18:55:33
depth1
children0
last_payout2019-01-10 18:55:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length289
author_reputation23,214,230,978,060
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,823,810
net_rshares0
@utopian-io ·
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](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

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

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (22)
authorutopian-io
permlinkre-open-source-skyblock-minecraft-addon-new-features-8-20190104t011739z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2019-01-04 01:17:42
last_update2019-01-04 01:17:42
depth1
children0
last_payout2019-01-11 01:17:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length592
author_reputation152,955,367,999,756
root_title"[Open Source] SkyBlock Minecraft Addon [New features #8]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id77,837,515
net_rshares0