mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Fixed index out of bounds error on custom GUI slot clicks.
This commit is contained in:
1 parent
0c25d7ec1c
commit
0e9ddd75b6
1 file changed
+5
@@ -108,6 +108,11 @@ public class ContainerCustomGui extends Container {
|
||||
public ItemStack slotClick(int slotId, int dragType, int clickTypeIn, EntityPlayer player) {
|
||||
if(slotId < 0)
|
||||
return super.slotClick(slotId, dragType, clickTypeIn, player);
|
||||
|
||||
if (slotId >= this.inventorySlots.size()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Slot mcSlot = (Slot)this.inventorySlots.get(slotId);
|
||||
if(!player.worldObj.isRemote && mcSlot != null) {
|
||||
IItemSlot slot = null;
|
||||
|
||||
Reference in new issue
Block a user