use isEmpty properly

This commit is contained in:
Ell 2024-11-30 20:08:12 +01:00
parent 474f0724d4
commit 4a0cde4435

View file

@ -91,7 +91,7 @@ public class CraftingModuleItem extends ModuleItem {
} }
} }
network.endProfile(); network.endProfile();
} else if (craft.travelingIngredients.size() <= 0) { } else if (craft.travelingIngredients.isEmpty()) {
// pull requested crafting results from the network once they are stored // pull requested crafting results from the network once they are stored
network.startProfile("crafting_results"); network.startProfile("crafting_results");
var items = network.getOrderedNetworkItems(tile.getBlockPos()); var items = network.getOrderedNetworkItems(tile.getBlockPos());
@ -219,7 +219,7 @@ public class CraftingModuleItem extends ModuleItem {
} }
} }
if (craft.travelingIngredients.size() <= 0 && craft.ingredientsToRequest.size() <= 0) { if (craft.travelingIngredients.isEmpty() && craft.ingredientsToRequest.isEmpty()) {
if (contents.emitRedstone) { if (contents.emitRedstone) {
tile.redstoneTicks = 5; tile.redstoneTicks = 5;
tile.getLevel().updateNeighborsAt(tile.getBlockPos(), tile.getBlockState().getBlock()); tile.getLevel().updateNeighborsAt(tile.getBlockPos(), tile.getBlockState().getBlock());