Slimefun-Addon-Community / ExoticGarden

A Slimefun 4 Addon that adds new plants and various new food items
https://dev.bukkit.org/projects/exotic-garden
GNU General Public License v3.0
54 stars 91 forks source link

Fixed duplication of falling blocks #234

Closed SleepyScallop closed 2 years ago

SleepyScallop commented 2 years ago

You could right click these items onto the bottom of plants and duplicate them, as they would stay in place and get dropped as well causing 2 items to appear. This fixes that.

TheBusyBiscuit commented 2 years ago

Also do you have a video of this happening? I am not quite sure I can follow as to what ther underlying cause is.

SleepyScallop commented 2 years ago

Also do you have a video of this happening? I am not quite sure I can follow as to what ther underlying cause is.

No, just use the latest version, right click a falling block onto the bottom of a fruit of a tree for example a coconut tree. Somtimes it will fall, other times it will stay put and duplicate the item. I will be looking into tags shortly.

SleepyScallop commented 2 years ago

Should be better now.

SleepyScallop commented 2 years ago

Also do you have a video of this happening? I am not quite sure I can follow as to what ther underlying cause is.

Heres your video https://www.youtube.com/watch?v=caSLmVYWN4c

This code i just pushed fixes it.

SoSeDiK commented 2 years ago

This seems more like a band-aid than fixing the actual underlying issue 🤔

BlockStorage.clearBlockInfo(loc); call adds the location to the removal queue, and then sets the block to AIR. Could it be that if you spam right click you can place the block after it's gone (set to AIR), but before it's removed from the Slimefun's data storage due to the tick difference?

(maybe there's something even more as to why the gravity affected blocks are even dropped and kept in the first place)

SleepyScallop commented 2 years ago

Do what you want then. The patch works just fine on my server.