diff --git a/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java b/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java index a45b81086..b65ce5135 100644 --- a/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java +++ b/src/main/java/de/srendi/advancedperipherals/common/addons/computercraft/peripheral/RsBridgePeripheral.java @@ -74,7 +74,7 @@ public final MethodResult listCraftableItems() { return notConnected(); List items = new ArrayList<>(); - RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.getObjectFromStack(item.copy(), getNetwork()))); + RefinedStorage.getCraftableItems(getNetwork()).forEach(item -> items.add(RefinedStorage.getObjectFromStack(item, getNetwork()))); return MethodResult.of(items); } diff --git a/src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java b/src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java index 9e13e7d8d..7f58105d6 100644 --- a/src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java +++ b/src/main/java/de/srendi/advancedperipherals/common/addons/refinedstorage/RefinedStorage.java @@ -55,7 +55,7 @@ public static ItemStack findStackFromStack(INetwork network, @Nullable ICrafting public static ItemStack findStackFromFilter(INetwork network, @Nullable ICraftingManager crafting, ItemFilter filter) { for (StackListEntry temp : network.getItemStorageCache().getList().getStacks()) { - if (filter.test(temp.getStack().copy())) + if (filter.test(temp.getStack())) return temp.getStack().copy(); } @@ -64,7 +64,7 @@ public static ItemStack findStackFromFilter(INetwork network, @Nullable ICraftin for (ICraftingPattern pattern : crafting.getPatterns()) { for(ItemStack stack : pattern.getOutputs()) { - if (filter.test(stack.copy())) + if (filter.test(stack)) return stack.copy(); } } @@ -78,7 +78,7 @@ public static FluidStack findFluidFromStack(INetwork network, @Nullable ICraftin public static FluidStack findFluidFromFilter(INetwork network, @Nullable ICraftingManager crafting, FluidFilter filter) { for (StackListEntry temp : network.getFluidStorageCache().getList().getStacks()) { - if (filter.test(temp.getStack().copy())) + if (filter.test(temp.getStack())) return temp.getStack().copy(); } @@ -165,7 +165,7 @@ public static Object getObjectFromPattern(ICraftingPattern pattern, INetwork net List outputsList = pattern.getOutputs(); List outputs = new ArrayList<>(); for (ItemStack itemStack : outputsList) - outputs.add(getObjectFromStack(itemStack.copy(), network)); + outputs.add(getObjectFromStack(itemStack, network)); map.put("outputs", outputs); @@ -174,7 +174,7 @@ public static Object getObjectFromPattern(ICraftingPattern pattern, INetwork net for (List singleInputList : inputList) { List inputs1 = new ArrayList<>(); for (ItemStack stack : singleInputList) - inputs1.add(getObjectFromStack(stack.copy(), network)); + inputs1.add(getObjectFromStack(stack, network)); inputs.add(inputs1); } @@ -182,7 +182,7 @@ public static Object getObjectFromPattern(ICraftingPattern pattern, INetwork net if (!pattern.isProcessing()) { List byproductsList = pattern.getByproducts(); for (ItemStack stack : byproductsList) - byproducts.add(getObjectFromStack(stack.copy(), network)); + byproducts.add(getObjectFromStack(stack, network)); } map.put("inputs", inputs); @@ -228,7 +228,7 @@ public static Map getObjectFromFluid(@Nullable FluidStack fluidS public static Object getItem(INetwork network, ItemStack item) { for (ItemStack itemStack : getItems(network)) { if (itemStack.sameItem(item) && Objects.equals(itemStack.getTag(), item.getTag())) - return getObjectFromStack(itemStack.copy(), network); + return getObjectFromStack(itemStack, network); } return null; }