mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-21 21:02:24 +00:00
Prevents a crash when a chisel is activated from a Battlegear slot
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user