From 4a0cde44354724d75b204a110ec54805b3663f87 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 30 Nov 2024 20:08:12 +0100 Subject: [PATCH] use isEmpty properly --- .../prettypipes/pipe/modules/craft/CraftingModuleItem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/prettypipes/pipe/modules/craft/CraftingModuleItem.java b/src/main/java/de/ellpeck/prettypipes/pipe/modules/craft/CraftingModuleItem.java index 26ddf49..29a9353 100644 --- a/src/main/java/de/ellpeck/prettypipes/pipe/modules/craft/CraftingModuleItem.java +++ b/src/main/java/de/ellpeck/prettypipes/pipe/modules/craft/CraftingModuleItem.java @@ -91,7 +91,7 @@ public class CraftingModuleItem extends ModuleItem { } } network.endProfile(); - } else if (craft.travelingIngredients.size() <= 0) { + } else if (craft.travelingIngredients.isEmpty()) { // pull requested crafting results from the network once they are stored network.startProfile("crafting_results"); 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) { tile.redstoneTicks = 5; tile.getLevel().updateNeighborsAt(tile.getBlockPos(), tile.getBlockState().getBlock());