SourceWriters / SmoothTimber

A tree chopping plugin for minecraft bukkit
GNU General Public License v3.0
34 stars 16 forks source link

[BUG]: doesnt work on folia #97

Open ewof opened 1 week ago

ewof commented 1 week ago

Describe what happend

from what i understand its bc the object task always executes on the server AFTER the last await() finishes it should execute the task then in get it should await and by then the task finishes executing so value isnt null but it never does that until after it finishes awaiting so task.get in getBlockState in Locator class is always null this might be because all the code is running on the region thread so execute schedules the task then the latch awaits before the task even started running which means the task doesnt run until after the latch finishes awaiting

i had this convo with elecetroniccat in the paper discord might be useful to u might not idk https://discord.com/channels/289587909051416579/1090729705222721637/1308115336758956052

Reproduction steps

use on folia

Expected behavior

the tree falls down

Media

No response

Java Version

Java 21

Server Software

folia

Minecraft Version

1.21.1

Plugin Version

latest commit

Additional Information

No response

Lauriichan commented 1 week ago

I am pretty sure that the latch doesn't block the regional thread as the thread that is actually calling the getBlockState method is not a regional or "synchornous" thread (I know thats wrong wording here) or at least it shouldn't be

Lauriichan commented 1 week ago

Can you please provide a list of the plugins you are using?

ewof commented 1 week ago

it happens on folia even when smoothtimber is the only plugin

Lauriichan commented 1 week ago

Fixed folia not breaking trees in e530b52a9cddec9b258be584f73ea8328e32733b. However I'll keep this open to keep track of the speed of tree breaking, trees break extremely slowly (delayed) on folia because of how the scheduling works.