Tree Axe and Spectrum not interacting well
fzzyhmstrs opened this issue · 4 comments
First, I believe this is an issue with the pugh-tools library, not emerald tools directly, but the issue was seen with Emerald Tools.
(This may also affect other tools such as the hammer)
Spectrum has many "cloaked" blocks, some of which include colored trees that disguise themselves as oak unless you are far enough in the mod. When you break one of these logs with your fist, it will drop the colored log if you are far enough in the mod, otherwise it will just drop oak.
When a Tree Axe is used on an "un-cloaked" colored tree (the player has advanced far enough to access them), the block directly broken by the axe breaks as expected, but all of the "vein mined" logs only drop as oak.
When I investigated the source a bit, I eventually made my way to pugh-tools and the processList
method in the TreeAxe class. This method uses world.breakBlock
circled in red, but that method doesn't provide breaking entity context. Spectrum needs this context to determine whether or not the breaking player has progressed far enough:
Since processList
is passed the player, I believe this is an easy fix of simply updating the breakBlock method: