diff --git a/common/src/main/java/gripe/_90/megacells/item/cell/BulkCellInventory.java b/common/src/main/java/gripe/_90/megacells/item/cell/BulkCellInventory.java index e636783e..326844fd 100644 --- a/common/src/main/java/gripe/_90/megacells/item/cell/BulkCellInventory.java +++ b/common/src/main/java/gripe/_90/megacells/item/cell/BulkCellInventory.java @@ -3,6 +3,7 @@ import static gripe._90.megacells.definition.MEGAItems.COMPRESSION_CARD; import java.math.BigInteger; +import java.util.Objects; import java.util.Set; import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; @@ -87,11 +88,11 @@ private CompoundTag getTag() { @Override public CellState getStatus() { - if (unitCount.signum() == 0) { + if (unitCount.signum() < 1) { return CellState.EMPTY; } - if (!storedItem.equals(filterItem)) { + if (!Objects.equals(storedItem, filterItem)) { return CellState.FULL; } @@ -160,7 +161,7 @@ public long insert(AEKey what, long amount, Actionable mode, IActionSource sourc return 0; } - if (filterItem == null || (storedItem != null && !filterItem.equals(storedItem))) { + if (filterItem == null || !Objects.equals(storedItem, filterItem)) { return 0; } @@ -193,7 +194,7 @@ public long extract(AEKey what, long amount, Actionable mode, IActionSource sour return 0; } - if (filterItem == null || (storedItem != null && !filterItem.equals(storedItem))) { + if (filterItem == null || !Objects.equals(storedItem, filterItem)) { return 0; }