Fix ItemDetector Cover not detecting slot 0
This commit is contained in:
parent
5f56c40a75
commit
896ee56a08
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ public class GT_Cover_ItemMeter
|
||||||
int tAll = 0;
|
int tAll = 0;
|
||||||
int tFull = 0;
|
int tFull = 0;
|
||||||
for (int i : tSlots) {
|
for (int i : tSlots) {
|
||||||
if ((i > 0) && (i < aTileEntity.getSizeInventory())) {
|
if ((i >= 0) && (i < aTileEntity.getSizeInventory())) {
|
||||||
tAll += 64;
|
tAll += 64;
|
||||||
ItemStack tStack = aTileEntity.getStackInSlot(i);
|
ItemStack tStack = aTileEntity.getStackInSlot(i);
|
||||||
if (tStack != null) {
|
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) {
|
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) {
|
switch(aCoverVariable) {
|
||||||
case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
|
case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
|
||||||
case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
|
case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
|
||||||
|
|
Loading…
Reference in a new issue