quick fix : Condition is covered by further condition

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent 4ad67bc34b
commit f446ea280f
17 files changed
+16 -25

No files matched your search

@@ -38,7 +38,7 @@ public class ToolProxyCommon implements IGuiHandler {
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity tile = world.getTileEntity(x, y, z);
if (tile != null && tile instanceof InventoryLogic) {
if (tile instanceof InventoryLogic) {
return ((InventoryLogic) tile).getGuiContainer(player.inventory, world, x, y, z);
}
return null;
@@ -124,7 +124,7 @@ public class EquipBlock extends InventoryBlock {
public void breakBlock(World par1World, int x, int y, int z, Block par5, int meta) {
TileEntity te = par1World.getTileEntity(x, y, z);
if (te != null && te instanceof EquipLogic) {
if (te instanceof EquipLogic) {
EquipLogic logic = (EquipLogic) te;
for (int iter = 0; iter < logic.getSizeInventory(); ++iter) {
ItemStack stack = iter == 0 ? logic.getEquipmentItem() : logic.getStackInSlot(iter);
@@ -166,7 +166,6 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
}
if (movingobjectposition != null
&& movingobjectposition.entityHit != null
&& movingobjectposition.entityHit instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) movingobjectposition.entityHit;
@@ -32,7 +32,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
for (int zPos = z - 1; zPos <= z + 1; zPos++) {
for (int yPos = y - 1; yPos <= y + 1; yPos++) {
TileEntity tile = world.getTileEntity(xPos, yPos, zPos);
if (tile != null && tile instanceof PatternChestLogic && (x == xPos || z == zPos))
if (tile instanceof PatternChestLogic && (x == xPos || z == zPos))
return new PartCrafterChestContainer(inventoryplayer, this, (PatternChestLogic) tile);
}
}