From 896ee56a0832667c38d0774b978548c663e22d68 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Thu, 23 Mar 2017 13:17:10 +0100 Subject: [PATCH] Fix ItemDetector Cover not detecting slot 0 --- src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java index 9768c7b5..d353b715 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -19,7 +19,7 @@ public class GT_Cover_ItemMeter int tAll = 0; int tFull = 0; for (int i : tSlots) { - if ((i > 0) && (i < aTileEntity.getSizeInventory())) { + if ((i >= 0) && (i < aTileEntity.getSizeInventory())) { tAll += 64; ItemStack tStack = aTileEntity.getStackInSlot(i); if (tStack != null) { @@ -36,7 +36,7 @@ public class GT_Cover_ItemMeter } public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (2 + aTileEntity.getSizeInventory()); + aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (1 + aTileEntity.getSizeInventory()); switch(aCoverVariable) { case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break; case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;