Conflict with other breakSpeed modifying mods
WolfieWaffle opened this issue ยท 4 comments
I have a mod that modifies breakSpeed of blocks, but its conflicting with the hard stone in this mod. I don't know much about modding, so I was wondering if you knew if it was possible to fix. Here is my current code (sorry I forgot to comment it but it should be understandable)
If this is a simple fix, what code do I have to change so that the mods stack?
Just as a thought, do you think the code for Haste and Mining fatigue might be helpful? I have found that haste is still affected by the hard stone.
Hm from my limited Java knowledge it looks like the EntityPlayer class is using an internal variable that haste affects, I don't we can use the same method the potion effect does.
It looks like both mods would need to be modified for this to work properly. They're both currently setting the new speed by modifying the original speed. When both mods do this, basically the last one to get the event wins. If instead, both mods set the new speed, by first checking the new speed (which is initialized to the original speed), then all of the modifications would be made properly. We can keep this issue around for me to fix on my side.
OK I think I found a solution, in my mod I have allowed for overrides such that by default it includes the default pickaxe values for Iberia hardstone. However it still gets overridden by Iberia, but if I disable the hard stone thing it removes it all from the world. If you add a config option to keep ore generation, but disable Iberia's speed modifier, it will allow mine to replace that function if present.