java.lang.StackOverflowError with Silent Gear hammer
FreeFull opened this issue · 6 comments
Minecraft 1.16.4
Tree Chop version: TreeChop-1.16.4-0.7fixed.jar
Silent Gear ver: SilentGear-1.16.3-2.3.10+182.jar
Silent Lib ver: SilentLib-1.16.3-4.9.0+63.jar
Forge 35.1.7
To reproduce:
- Have both Silent Gear and Tree Chop installed
- Create any Silent Gear hammer
- Make sure you are in survival mode, not creative
- Use the hammer on a 3x3 area of stone
The wall fails to break, and the game crashes after a bit of time. Looking at the crash log, there seems to be some sort of infinite recursion with Silent Gear's onBlockStartBreak and HT Tree Chop's onBreakEvent.
Logs: https://gist.github.com/FreeFull/441f4b9e5e24c033b0a1b0426a1bb5c5
I added a tool blacklist in 0.9. In config/treechop-common.toml
, line 21: choppingToolsBlacklist = ["#forge:saws"]
. The default item tag #forge:saws
includes Silent Gear saws, so they should act normally and hopefully no longer conflict with this mod.
My plan to integrate Silent Gear saws (and other mods that add axes that break whole trees) is to override their behavior to do multiple chops instead of instantly breaking the whole tree, as suggested here. Still deciding on the best way to implement this. Work on this will be logged in #9.
Thanks for the very detailed information. I’ll look into this soon. In the meantime, looks like if you change to TreeChop 0.6, the crash should stop (the bit that is causing the recursion was introduced in 0.7). Note that in 0.6, chopping doesn’t drain tool durability.
The issue should be fixed as of version 0.8. It's not on CurseForge yet but it is on GitHub at https://github.com/hammertater/treechop/releases/tag/0.8
Hm, one note: A similar crash happens when using Silent Gear's saw on a tree (which also tries to chop down the whole tree). Perhaps the config could have some sort of "tool blacklist", if this case can't be easily fixed otherwise?