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/main/java/gregtech/common/covers/GT_Cover_Pump.java | |
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/main/java/gregtech/common/covers/GT_Cover_Pump.java')
-rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_Pump.java | 48 |
1 files changed, 13 insertions, 35 deletions
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;
}
|