quick fix : Redundant 'if' statement

This commit is contained in:
Alexdoru committed 2023-01-25 23:11:58 +01:00
1 parent ce3ee201a3
commit d0c3b57e22
29 files changed
+48 -130

No files matched your search

@@ -20,18 +20,12 @@ public class SlotBehavedOnly extends Slot {
int stackL = b.getStackLimit(par1ItemStack);
if (b != null
&& this.inventory.getStackInSlot(this.slotNumber) != null
&& !this.inventory.getStackInSlot(this.slotNumber).isItemEqual(par1ItemStack)) {
if (this.inventory.getStackInSlot(this.slotNumber) != null && !this.inventory.getStackInSlot(this.slotNumber).isItemEqual(par1ItemStack)) {
ItemStack is = this.inventory.getStackInSlot(this.slotNumber);
if (is.stackSize + par1ItemStack.stackSize <= stackL) {
return true;
}
return is.stackSize + par1ItemStack.stackSize <= stackL;
} else {
return par1ItemStack.stackSize <= stackL;
}
return false;
// return b != null;
}