quick fix : Simplifiable conditional expression

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent cdc7dcf5d0
commit 0657a754e2
9 files changed
+20 -34

No files matched your search

@@ -44,7 +44,7 @@ public abstract class EquipLogic extends InventoryLogic {
@Override
public boolean isStackInSlot(int slot) {
return slot != 0 ? inventory[slot] != null : false;
return slot != 0 && inventory[slot] != null;
}
@Override
@@ -307,7 +307,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
@Override
public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) {
return par1 == 2 ? false : (par1 == 1 ? isItemFuel(par2ItemStack) : true);
return par1 != 2 && (par1 != 1 || isItemFuel(par2ItemStack));
}
@Override