mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Add default cases to switch statements
This commit is contained in:
1 parent
9140f84d57
commit
68ab1b98bd
5 files changed
+16
-7
No files matched your search
@@ -34,7 +34,8 @@ public enum FarmDirection {
|
||||
return SOUTH;
|
||||
case WEST:
|
||||
return WEST;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1059,6 +1059,8 @@ public enum TreeDefinition implements ITreeDefinition, ITreeGenerator {
|
||||
case WEST:
|
||||
vanillaWoodMeta |= 1 << 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
world.setBlock(x, y, z, vanillaWoodBlock, vanillaWoodMeta, Constants.FLAG_BLOCK_SYNCH);
|
||||
|
||||
@@ -133,8 +133,9 @@ public class StandardTank extends FluidTank implements IStreamable {
|
||||
case DEFAULT:
|
||||
case INPUT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canBeDrainedExternally() {
|
||||
@@ -142,8 +143,9 @@ public class StandardTank extends FluidTank implements IStreamable {
|
||||
case DEFAULT:
|
||||
case OUTPUT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canFill(Fluid fluid, int amount) {
|
||||
|
||||
@@ -51,8 +51,9 @@ public class EnergyManager implements IEnergyHandler, IStreamable {
|
||||
case EXTRACT:
|
||||
case BOTH:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean canReceive() {
|
||||
@@ -60,8 +61,9 @@ public class EnergyManager implements IEnergyHandler, IStreamable {
|
||||
case RECEIVE:
|
||||
case BOTH:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* NBT */
|
||||
|
||||
@@ -328,8 +328,9 @@ public class ItemBackpack extends ItemWithGui {
|
||||
return new GuiBackpack(new ContainerBackpack(player, ContainerBackpack.Size.DEFAULT, heldItem));
|
||||
case T2:
|
||||
return new GuiBackpackT2(new ContainerBackpack(player, ContainerBackpack.Size.T2, heldItem));
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -343,7 +344,8 @@ public class ItemBackpack extends ItemWithGui {
|
||||
return new ContainerBackpack(player, ContainerBackpack.Size.DEFAULT, heldItem);
|
||||
case T2:
|
||||
return new ContainerBackpack(player, ContainerBackpack.Size.T2, heldItem);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user