SourceWriters / SmoothTimber

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

folia fixes #82

Closed ewof closed 5 months ago

ewof commented 6 months ago

fixes various java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.World.getCurrentWorldData()" is null errors

Lauriichan commented 5 months ago

Thank you for your contribution, without it I would not have known about the errors and probably wouldn't have fixed it. Your work inspired a9cfddc :)

However we would appreciate it if you could open a bug issue before creating the PR next time :D

Also the reasons why your PR was not merged before hand are:

  1. We want to avoid creating runnables if they are not necessary (so reduce the amount of regionalTask calls)
  2. There is no reason to clamp values in the platform scheduler, if a value is invalid then the value should be adjusted at the location where the error happens, so in terms of the task timer that would be in the TickTimer class
  3. In general I saw no reason to add the asyncTask calls for the events, the whole event call makes no sense if we don't wait for the event to finish which makes the event useless in the end x) [which is like a main reason, as this would introduce a critical bug x) ]