BluSunrize / ImmersiveEngineering

Wires, transformers, high voltage! Bzzzzt!
Other
786 stars 391 forks source link

[1.12.2] Faraday armor crashs on Tesla Coil high power #2688

Closed joselitosn closed 6 years ago

joselitosn commented 6 years ago

If you get zapped enough by the Tesla Coil on High power, the armor should be destroyed but instead it crashes the game.

Pastebin Crash Log

It seems the bug is caused because the item slot is set to null on destruction.

https://github.com/BluSunrize/ImmersiveEngineering/blob/830c0ffa39b8ed7dc0c508559030819e8bceaddd/src/main/java/blusunrize/immersiveengineering/common/items/ItemFaradaySuit.java#L60

Setting it to ItemStack.EMPTY fixed the problem for me.

p.setItemStackToSlot(eqSlot, ItemStack.EMPTY);

Also as a suggestion, maybe the chain armor could have the same shield effect.

EDIT: Another suggestion, the Tesla Coil could target more enemies at the same time but do less damage as the more enemies it targets.

mindforger commented 6 years ago

Another suggestion, the Tesla Coil could target more enemies at the same time but do less damage as the more enemies it targets

it could alternate between targets beeing at the same distance +/- a little bit (maybe a chance calculation to be hit when in range) but hitting multiple targets at the same time would be not logical, when a current path to a target is choosen there will be only one discharge, never multiple in parallel, only alternating paths are possible