diff options
| author | John <Techlone@users.noreply.github.com> | 2016-04-02 16:07:59 +0500 |
|---|---|---|
| committer | John <Techlone@users.noreply.github.com> | 2016-04-02 16:07:59 +0500 |
| commit | 0aad2f76890c0490b3a277609fa48cce0a97ce1f (patch) | |
| tree | 4c3d81b018e860597811036b57289e31954995db /src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java | |
| parent | 792cca0af612ff35bd36e5408e538a386f5d02db (diff) | |
| parent | b71fa8f0429cf58b7e16aa94c9361d33e85dbe5f (diff) | |
| download | GT5-Unofficial-0aad2f76890c0490b3a277609fa48cce0a97ce1f.tar.gz GT5-Unofficial-0aad2f76890c0490b3a277609fa48cce0a97ce1f.tar.bz2 GT5-Unofficial-0aad2f76890c0490b3a277609fa48cce0a97ce1f.zip | |
Merge pull request #1 from Blood-Asp/experimental
Update from orig
Diffstat (limited to 'src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java')
| -rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java | 11 |
1 files changed, 5 insertions, 6 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 33722e64e1..9768c7b5db 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -28,16 +28,15 @@ public class GT_Cover_ItemMeter }
}
tAll /= 14;
- if (tAll > 0) {
- aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable != 1 ? 0 : tFull > 0 ? (byte) (tFull / tAll + 1) : (byte) (15 - (tFull > 0 ? tFull / tAll + 1 : 0)));
- } else {
- aTileEntity.setOutputRedstoneSignal(aSide, (byte) (aCoverVariable != 1 ? 0 : 15));
- }
+ if(tAll > 0)
+ aTileEntity.setOutputRedstoneSignal(aSide, aCoverVariable == 1 ? (byte)(15 - (tFull <= 0 ? 0 : tFull / tAll + 1)) : tFull <= 0 ? 0 : (byte)(tFull / tAll + 1));
+ else
+ aTileEntity.setOutputRedstoneSignal(aSide, ((byte)(aCoverVariable == 1 ? 15 : 0)));
return aCoverVariable;
}
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- aCoverVariable = (aCoverVariable + 1) % (2 + aTileEntity.getSizeInventory());
+ aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % (2 + aTileEntity.getSizeInventory());
switch(aCoverVariable) {
case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
|
