diff options
| author | Shawn Buckley <shawntbuckley@gmail.com> | 2015-10-25 09:27:29 -0400 | 
|---|---|---|
| committer | Shawn Buckley <shawntbuckley@gmail.com> | 2015-10-25 09:27:29 -0400 | 
| commit | 46f4473de67d66676f3ecc36c6e441db3d1eebfe (patch) | |
| tree | 414875f3aea68db992125ae3051d6a0e56f8ae59 /src | |
| parent | 756e7edc64d3d3495e72e199928b0bcb193d2381 (diff) | |
| download | GT5-Unofficial-46f4473de67d66676f3ecc36c6e441db3d1eebfe.tar.gz GT5-Unofficial-46f4473de67d66676f3ecc36c6e441db3d1eebfe.tar.bz2 GT5-Unofficial-46f4473de67d66676f3ecc36c6e441db3d1eebfe.zip | |
Change if chains to switches
Diffstat (limited to 'src')
12 files changed, 90 insertions, 221 deletions
| diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java index 746b11a59d..9d4816fb68 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java @@ -36,41 +36,19 @@ public class GT_Cover_Conveyor      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 12;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)");
 -        }
 -        if (aCoverVariable == 4) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)");
 -        }
 -        if (aCoverVariable == 5) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)");
 -        }
 -        if (aCoverVariable == 6) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input");
 -        }
 -        if (aCoverVariable == 7) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output");
 -        }
 -        if (aCoverVariable == 8) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)");
 -        }
 -        if (aCoverVariable == 9) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)");
 -        }
 -        if (aCoverVariable == 10) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)");
 -        }
 -        if (aCoverVariable == 11) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
 +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
 +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
 +            case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
 +            case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
 +            case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
 +            case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
 +            case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
 +            case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java index cd1f095396..5355a53d51 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_DoesWork.java @@ -29,17 +29,11 @@ public class GT_Cover_DoesWork      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 4;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Ready to work");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Not ready to work");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Ready to work"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Not ready to work"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java index e27346e776..8d47d4a5d0 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -59,23 +59,13 @@ public class GT_Cover_Drain      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 6;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away");
 -        }
 -        if (aCoverVariable == 4) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (conditional)");
 -        }
 -        if (aCoverVariable == 5) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (invert cond)");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away"); break;
 +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (conditional)"); break;
 +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Keep Liquids Away (invert cond)"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java index d723721b63..bc228d5f25 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EUMeter.java @@ -92,41 +92,19 @@ public class GT_Cover_EUMeter      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 12;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Universal Storage");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Universal Storage");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage");
 -        }
 -        if (aCoverVariable == 4) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Steam Storage");
 -        }
 -        if (aCoverVariable == 5) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Steam Storage");
 -        }
 -        if (aCoverVariable == 6) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Input");
 -        }
 -        if (aCoverVariable == 7) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Input");
 -        }
 -        if (aCoverVariable == 8) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Output");
 -        }
 -        if (aCoverVariable == 9) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Output");
 -        }
 -        if (aCoverVariable == 10) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage(Including Batterys)");
 -        }
 -        if (aCoverVariable == 11) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage(Including Batterys)");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal Universal Storage"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Universal Storage"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage"); break;
 +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Normal Steam Storage"); break;
 +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Steam Storage"); break;
 +            case 6: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Input"); break;
 +            case 7: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Input"); break;
 +            case 8: GT_Utility.sendChatToPlayer(aPlayer, "Normal Average Electric Output"); break;
 +            case 9: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Average Electric Output"); break;
 +            case 10: GT_Utility.sendChatToPlayer(aPlayer, "Normal Electricity Storage(Including Batteries)"); break;
 +            case 11: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Electricity Storage(Including Batteries)"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java index 5c0f1ea001..49d2e09ac9 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java @@ -11,14 +11,10 @@ public class GT_Cover_EnergyOnly          extends GT_CoverBehavior {
      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 3;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Allow");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Allow"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Allow (conditional)"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Disallow (conditional)"); break;
          }
          return aCoverVariable;
      }
 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 874ba55728..33722e64e1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemMeter.java @@ -38,12 +38,10 @@ 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 + 1) % (2 + aTileEntity.getSizeInventory());
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Normal");
 -        } else if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted");
 -        } else {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Slot: " + (aCoverVariable - 2));
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Normal"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Inverted"); break;
 +            default: GT_Utility.sendChatToPlayer(aPlayer, "Slot: " + (aCoverVariable - 2)); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java index 78f71e1135..2c60daa679 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_NeedMaintainance.java @@ -45,35 +45,17 @@ public class GT_Cover_NeedMaintainance extends GT_CoverBehavior {      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {          aCoverVariable = (aCoverVariable + 1) % 10; -        if (aCoverVariable == 0) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintainance Needed"); -        } -        if (aCoverVariable == 1) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintainance Needed(inverted)"); -        } -        if (aCoverVariable == 2) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintainance Needed"); -        } -        if (aCoverVariable == 3) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintainance Needed(inverted)"); -        } -        if (aCoverVariable == 4) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintainance Needed"); -        } -        if (aCoverVariable == 5) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintainance Needed(inverted)"); -        } -        if (aCoverVariable == 6) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintainance Needed"); -        } -        if (aCoverVariable == 7) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintainance Needed(inverted)"); -        } -        if (aCoverVariable == 8) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintainance Needed"); -        } -        if (aCoverVariable == 9) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintainance Needed(inverted)"); +        switch(aCoverVariable) { +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintenance Needed"); break; +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 1 Maintenance Needed(inverted)"); break; +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintenance Needed"); break; +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 2 Maintenance Needed(inverted)"); break; +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintenance Needed"); break; +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 3 Maintenance Needed(inverted)"); break; +            case 6: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintenance Needed"); break; +            case 7: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 4 Maintenance Needed(inverted)"); break; +            case 8: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintenance Needed"); break; +            case 9: GT_Utility.sendChatToPlayer(aPlayer, "Emit if 5 Maintenance Needed(inverted)"); break;          }          return aCoverVariable;      } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java index c89e46be79..ee2ce60bd4 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -54,14 +54,10 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior {      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {          aCoverVariable = (aCoverVariable + 1) % 3; -        if (aCoverVariable == 0) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if any Player is close"); -        } -        if (aCoverVariable == 1) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); -        } -        if (aCoverVariable == 2) { -            GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); +        switch(aCoverVariable) { +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Emit if any Player is close"); break; +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Emit if you are close"); break; +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Emit if other player is close"); break;          }          return aCoverVariable;      } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java index 52170883c7..373ad3bd01 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -69,41 +69,19 @@ public class GT_Cover_Pump      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 12;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)");
 -        }
 -        if (aCoverVariable == 4) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)");
 -        }
 -        if (aCoverVariable == 5) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)");
 -        }
 -        if (aCoverVariable == 6) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input");
 -        }
 -        if (aCoverVariable == 7) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output");
 -        }
 -        if (aCoverVariable == 8) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)");
 -        }
 -        if (aCoverVariable == 9) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)");
 -        }
 -        if (aCoverVariable == 10) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)");
 -        }
 -        if (aCoverVariable == 11) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Export"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Import"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Export (conditional)"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Import (conditional)"); break;
 +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Export (invert cond)"); break;
 +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Import (invert cond)"); break;
 +            case 6: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input"); break;
 +            case 7: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output"); break;
 +            case 8: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (conditional)"); break;
 +            case 9: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (conditional)"); break;
 +            case 10: GT_Utility.sendChatToPlayer(aPlayer, "Export allow Input (invert cond)"); break;
 +            case 11: GT_Utility.sendChatToPlayer(aPlayer, "Import allow Output (invert cond)"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java index 955e8435d5..def941cd4e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneConductor.java @@ -20,26 +20,13 @@ public class GT_Cover_RedstoneConductor      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 7;
          switch (aCoverVariable) {
 -            case 0:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts strongest Input");
 -                break;
 -            case 1:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from bottom Input");
 -                break;
 -            case 2:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from top Input");
 -                break;
 -            case 3:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from north Input");
 -                break;
 -            case 4:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from south Input");
 -                break;
 -            case 5:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from west Input");
 -                break;
 -            case 6:
 -                GT_Utility.sendChatToPlayer(aPlayer, "Conducts from east Input");
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Conducts strongest Input"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from bottom Input"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from top Input"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from north Input"); break;
 +            case 4: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from south Input"); break;
 +            case 5: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from west Input"); break;
 +            case 6: GT_Utility.sendChatToPlayer(aPlayer, "Conducts from east Input"); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java index cd1bcd628b..fa1af824b3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneSignalizer.java @@ -11,12 +11,10 @@ public class GT_Cover_RedstoneSignalizer          extends GT_CoverBehavior {
      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 48;
 -        if (aCoverVariable / 16 == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Signal = " + (aCoverVariable & 0xF));
 -        } else if (aCoverVariable / 16 == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Conditional Signal = " + (aCoverVariable & 0xF));
 -        } else if (aCoverVariable / 16 == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Inverted Conditional Signal = " + (aCoverVariable & 0xF));
 +        switch(aCoverVariable / 16) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Signal = " + (aCoverVariable & 0xF)); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Conditional Signal = " + (aCoverVariable & 0xF)); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Inverted Conditional Signal = " + (aCoverVariable & 0xF)); break;
          }
          return aCoverVariable;
      }
 diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java index 95f3cf1d7f..e6b8aa9b07 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Shutter.java @@ -15,17 +15,11 @@ public class GT_Cover_Shutter      public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
          aCoverVariable = (aCoverVariable + 1) % 4;
 -        if (aCoverVariable == 0) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Open if work enabled");
 -        }
 -        if (aCoverVariable == 1) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Open if work disabled");
 -        }
 -        if (aCoverVariable == 2) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Only Output allowed");
 -        }
 -        if (aCoverVariable == 3) {
 -            GT_Utility.sendChatToPlayer(aPlayer, "Only Input allowed");
 +        switch(aCoverVariable) {
 +            case 0: GT_Utility.sendChatToPlayer(aPlayer, "Open if work enabled"); break;
 +            case 1: GT_Utility.sendChatToPlayer(aPlayer, "Open if work disabled"); break;
 +            case 2: GT_Utility.sendChatToPlayer(aPlayer, "Only Output allowed"); break;
 +            case 3: GT_Utility.sendChatToPlayer(aPlayer, "Only Input allowed"); break;
          }
          return aCoverVariable;
      }
 | 
