Skip to content

Commit 7a2a45b

Browse files
committed
Don't waste time while copying the stack
1 parent 67fb8c7 commit 7a2a45b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/de/srendi/advancedperipherals/common/util/LuaConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static Object posToObject(BlockPos pos) {
103103
public static Map<String, Object> stackToObject(@NotNull ItemStack stack) {
104104
if (stack.isEmpty()) return new HashMap<>();
105105
Map<String, Object> map = itemToObject(stack.getItem());
106-
DataComponentPatch components = stack.copy().getComponentsPatch();
106+
DataComponentPatch components = stack.getComponentsPatch();
107107
map.put("count", stack.getCount());
108108
map.put("displayName", stack.getDisplayName().getString());
109109
map.put("maxStackSize", stack.getMaxStackSize());

0 commit comments

Comments
 (0)