Ellpeck / ActuallyAdditions

A Minecraft Mod about lots of useful gadgets and things!
http://minecraft.curseforge.com/projects/actually-additions
MIT License
214 stars 99 forks source link

ItemAllToolAA not respecting harvest levels (1.12.2). #1312

Closed JonathanCSmith closed 4 years ago

JonathanCSmith commented 4 years ago

It would appear that your complex nested ternary for assessing 'canHarvest' in ItemAllToolAA is not respecting the harvest levels declared by the blocks but is instead hardcoding the values. To my somewhat naive understanding this prevents mods from adjusting hardness levels and prevents intermod compatibility. I believe a fix would be to use something along the lines of: state.getBlock(). getHarvestLevel() where possible. This should also reduce some complexity on your end.

JonathanCSmith commented 4 years ago

Actually I am not 100% sure this is bug referenced there is an error in this code (although if you care to comment on the above it will certainly help me track down the issue further!).

Ellpeck commented 4 years ago

that is just a straight up copy-paste of the vanilla tools lol