fix OOB crash
This commit is contained in:
@@ -115,6 +115,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable implements I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
||||||
|
if (slotId >= 0 && slotId < this.inventorySlots.size()) {
|
||||||
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
|
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
|
||||||
if (this.inventorySlots.get(slotId) == magnetSlot) {
|
if (this.inventorySlots.get(slotId) == magnetSlot) {
|
||||||
ItemStack itemStack = magnetSlot.getStack();
|
ItemStack itemStack = magnetSlot.getStack();
|
||||||
@@ -135,6 +136,7 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable implements I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
|
||||||
|
if (slotId >= 0 && slotId < this.inventorySlots.size()) {
|
||||||
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
|
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
|
||||||
if (this.inventorySlots.get(slotId) == magnetSlot) {
|
if (this.inventorySlots.get(slotId) == magnetSlot) {
|
||||||
ItemStack itemStack = magnetSlot.getStack();
|
ItemStack itemStack = magnetSlot.getStack();
|
||||||
@@ -184,6 +185,7 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user