Harvest level changing not working due to (?) relying on old ForgeHooks system
ReikaKalseki opened this issue ยท 4 comments
Apparently, ITT fails to change the harvest level of ElectriCraft ores, because it provides its harvest level by the appropriate method in Block
. This means that its harvest level remains unchanged.
The only thing I can think of is that ITT is using the old system in ForgeHooks, but that was deprecated in early 1.7 and has largely been abandoned.
To be fair, I do not really see a way around this short of either ASM to replace the method body - which you are free to do if you like, given the simplicity of the code, and I suspect you will need for other mods' ores as well - or my writing a reflective handler to read your configs, which I would rather not do.
ITT uses the standard Forge API, Block.setHarvestLevel, which is neither old(?) nor deprecated.
OK, I can see why this would have failed. I override getHarvestLevel()
, which means calling setHarvestLevel
changes nothing of importance. The return value is a final int specified in an enum constructor, so I do not see a clean fix to this...
At any rate, closed since it is not on your end. No, the above is not the deprecated system I was referring to.
Well, I suppose you could iterate over your ElectriOres.oreList in the blocks constructor and call setHarvestLevel for each. Then you also wouldn't need to override the function.