Bound tools don't respect setHarvestLevel
bonii-xx opened this issue ยท 5 comments
Harvest Levels are hardcoded, Iguana Tinker Tweaks kinda needs that. ;)
Didn't look at axe and shovel, but my logs indicate that they don't support it either.
Solved via #463
As far as I can see from that piece of code it makes tools useless if not activated. So it isn't equivalent to simple setHarvestLevel("pickaxe", 5)
.
If it were to respect setHarvestLevel()
calls it'd return super.getHarvestLevel("pickaxe")
instead of 5
, I think.
Or the pickaxe could set it's harvest level to ("pickaxe", 5) by default, and in the getHarvestLevel method, return (getActivated(stack) && "pickaxe".equals(toolClass)) ? harvestLevel : 0;
That way, you're still checking whether or not the pick is even activated, and if it is, use the harvest level, otherwise it's still 0, same as today.
what is the correct way to do that? lookup the tool in the tool registry in forge and return the result?