BG-Software-LLC / SuperiorSkyblock2

Optimized, feature packed Skyblock core.
https://bg-software.com/superiorskyblock/
GNU General Public License v3.0
167 stars 145 forks source link

Block count bug #2198

Open AlmostPanda opened 2 months ago

AlmostPanda commented 2 months ago

Minecraft's Version

Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)

Plugin's Version

2024.2-b300

Describe the bug

when you plant spruce spalings 2x2 on podzol and cut down the tree you can see 4 podzols in /is blocks but if you grow up another 2x2 spruce tree on these 4 podzols the number of podzols in /is blocks goes up which is a simple way of duping is worth if you're using Slimefun

which brings me to second bug dont know if its related to slimefun but probably is, but if you set up woodcutter android and let it chop down any tree the number of logs in /is blocks will remain same and after another tree grown it goes up until /is recalc which fixes the log count this also happens with Lumber Axe which is from Slimefun too

could be add a protection? if you dont agree you can ignore the second bug and I'll move it to Discussions, its up to you.

To Reproduce

  1. bug

    1. place 4 podzols
    2. grow up 2x2 spruce tree on it
    3. check /is blocks (the number of podzols should go up)
  2. bug

    1. grow up any tree
    2. check /is blocks
    3. set up woodcutter android from Slimefun and chop down the tree / or use Lumber Axe
    4. check /is blocks (the number of logs should remain same)

Additional Information

after first grown tree (43 Podzol and 93 Spruce Logs) image

after second grown tree on the same place (47 Podzol and 132 Spruce Logs) image

OmerBenGera commented 2 months ago

The first bug is fixed in latest dev build. Regarding the second bug with Slimefun, I am not sure how to set up a woodcutter. Can you explain me how to do it so I can look into the bug?

AlmostPanda commented 2 months ago

Sure, I've made a video to understand it better. link: https://www.youtube.com/watch?v=Z1jk_OHGLds

here is my script, so you dont have to make your own, put the WOODCUTTER folder inside Slimefun/scripts + check if the WOODCUTTER folder contains AlmostPanda 1 file script.zip

like this image

Useful informations:

  1. To get the woodcutter use command /sf give <your_nick> PROGRAMMABLE_ANDROID_WOODCUTTER
  2. When you place the 2x2 saplings and woodcutter and bonemeal won't grow the tree, place the woodcutter on different side

about the bug: You can see that after using the /is blocks command after the tree grows there are 12 Podzols and 16 Grass Blocks in menu but in game there are only 4 Grass Blocks and 12 Podzols, so it registered new Podzols but didnt removed transformed Grass Blocks

when you end with testing do /is level or /is recalc and check /is block the amount of grass blocks will be fixed and amount of logs too

PS: I think the log amount bug also works on leaves (doesnt matter if its spruce or any other type of wood, works for all same)

if you have any other questions feel free to ask

OmerBenGera commented 2 months ago

Slimefun do not fire any event when they break blocks. They should fire an event so other plugins can interact with it and support it. Contact them for further help, and once they add the event - open a new issue if it still doesn't work.

Regarding the other bug, hopefully fixed in latest dev build.

AlmostPanda commented 2 months ago

yes, the issue with transforming Podzol is fixed

dont know if this is important, but if you place a Mycelium and dirt next to it and check /is blocks its not updated untill you do recalc command, but I dont think you have to fix that too

its up to you, my main goal is fixed, thank you

OmerBenGera commented 2 months ago

Check out latest dev build, let me know if it is fixed

JustAHuman-xD commented 2 months ago

I can look into making a PR to add the necessary events. For the lumber axe it'll just be block break events so shouldn't be a problem, but for the android it'll be a custom event would then need to be handled here. Would that work?

OmerBenGera commented 2 months ago

I can look into making a PR to add the necessary events. For the lumber axe it'll just be block break events so shouldn't be a problem, but for the android it'll be a custom event would then need to be handled here. Would that work?

There's already an event for android called "AndroidMineEvent" - not sure why it is not called from a Progammable Android.

AlmostPanda commented 2 months ago

dont know if this is important, but if you place a Mycelium and dirt next to it and check /is blocks its not updated untill you do recalc command, but I dont think you have to fix that too

Mycelium, Grass Block spread is fixed and it also fixes spread with Sculk thank you

edit: will leave it open till Slimefun fix

JustAHuman-xD commented 2 months ago

There's already an event for android called "AndroidMineEvent" - not sure why it is not called from a Progammable Android.

It is, it's called from the miner android that handles things like cobblestone, etc. The woodcutter android however does not use the event. It'd need a different event since the mine event is specifically for the miner android, as stated in its java docs.