mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 12:42:57 +00:00
quick fix : Condition is covered by further condition
This commit is contained in:
1 parent
4ad67bc34b
commit
f446ea280f
17 files changed
+16
-25
No files matched your search
@@ -77,7 +77,7 @@ public class ArmorAbilities {
|
||||
|
||||
@SubscribeEvent
|
||||
public void dimensionChanged(PlayerEvent.PlayerChangedDimensionEvent event) {
|
||||
if (event.player == null || !(event.player instanceof EntityPlayerMP)) return;
|
||||
if (!(event.player instanceof EntityPlayerMP)) return;
|
||||
|
||||
// this callback is only called serverside
|
||||
float oldHealth = event.player.getHealth();
|
||||
|
||||
@@ -27,8 +27,7 @@ public class SlotAccessory extends Slot {
|
||||
*/
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
Item item = (par1ItemStack == null ? null : par1ItemStack.getItem());
|
||||
return item != null
|
||||
&& (item instanceof IAccessory)
|
||||
return (item instanceof IAccessory)
|
||||
&& ((IAccessory) item).canEquipAccessory(par1ItemStack, this.slotID);
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,7 @@ public class SlotCanister extends Slot {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
Item item = (par1ItemStack == null ? null : par1ItemStack.getItem());
|
||||
return item != null
|
||||
&& (item instanceof IHealthAccessory)
|
||||
return (item instanceof IHealthAccessory)
|
||||
&& ((IHealthAccessory) item).canEquipAccessory(par1ItemStack, this.slotID);
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,6 @@ public class SlotKnapsack extends Slot {
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
Item item = (par1ItemStack == null ? null : par1ItemStack.getItem());
|
||||
return item != null && (item instanceof Knapsack);
|
||||
return (item instanceof Knapsack);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user