Prevents a crash when a chisel is activated from a Battlegear slot

This commit is contained in:
jss2a98aj committed 2021-07-17 21:15:59 -04:00
1 parent 37d8e908b4
commit c6f9373308
1 file changed
+5
@@ -69,6 +69,11 @@ public final class ChiselController {
ItemStack held = event.entityPlayer.getCurrentEquippedItem();
int slot = event.entityPlayer.inventory.currentItem;
//Prevents a crash when activated from a Battlegear slot.
if(slot > 8 || slot < 0) {
return;
}
if (held == null || !(held.getItem() instanceof IChiselItem)) {
return;
}