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_EnergyOnly.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_EnergyOnly.java')
-rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java | 12 |
1 files changed, 4 insertions, 8 deletions
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;
}
|