yeelp / Distinct-Damage-Descriptions

Adding physical D&D-style damage types to Minecraft to deepen the combat
MIT License
9 stars 4 forks source link

HBM causes ArrayIndexOutOfBoundsException with tooltips #108

Closed ShadeAware closed 3 months ago

ShadeAware commented 3 months ago

Immediate CTD when using HBM's Nuclear Tech and opening a bomb kit with any hazmat gear, closing with an java.lang.IndexOutOfBoundsException.

See https://pastebin.com/kaiZh668 for full log.

yeelp commented 3 months ago

https://github.com/yeelp/Distinct-Damage-Descriptions/blob/2fb78d3e72321b4cd4f31e6154c2f5e1e22af617/src/main/java/yeelp/distinctdamagedescriptions/handlers/TooltipHandler.java#L26

The first argument that is a constant 1 may throw an array index exception, should check tooltip length first.