
Incompatibility with LightningCraft
DatrixTHLK opened this issue ยท 3 comments
Issue Description:
When both EnderIO and Lightningcraft are present game crashes
Reference Issue from LC issues page
What happens:
Crash happens when both LightningCraft and EnderIO are present but take one out and it doesn't crash
What you expected to happen:
Everything to cooperate and no crash to occur.
Steps to reproduce:
- Take out Lightning Craft and leave EnderIO game works
- Take out EnderIO and Coremod and leave LightningCraft the game works
- Keep both EnderIO, CoreMod and LightningCraft and the game crashes
...
Affected Versions (Do not use "latest"):
- EnderIO: 3.0.1.120_beta
- EnderCore: 0.4.1.55-beta
- LightningCraft2: 2.6.0
- Minecraft: 1.10.2
- Forge: 12.18.2.2114
Your most recent log file where the issue was present:
Crash Log: https://gist.github.com/DatrixTHLK/7eaf4fc0ed4dc3f6c809019d0c32a6a2
lightningcraft uses a method that will always crash, because @LexManos thinks that including methods with Forge that behave that way is a good way to show how much more intelligent than all modders he is.
A switch() on an Enum will crash if the Enum contains a different amount of elements at runtime than at compile time. That's what's happening here. Don't use net.minecraft.item.Item.ToolMaterial.getRepairItem() or net.minecraft.item.Item.ToolMaterial.getRepairItemStack().