From 844c665e93b38fca344dc63a7c68fa8dcb9cef94 Mon Sep 17 00:00:00 2001 From: Jelle De Loecker Date: Sat, 22 Jun 2024 20:00:23 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Make=20sure=20to=20use=20the=20c?= =?UTF-8?q?orrect=20stack=20size=20when=20recovering=20the=20original=20st?= =?UTF-8?q?ack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/github/theepicblock/polymc/impl/PolyMapImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/theepicblock/polymc/impl/PolyMapImpl.java b/src/main/java/io/github/theepicblock/polymc/impl/PolyMapImpl.java index d9965482..341e220c 100644 --- a/src/main/java/io/github/theepicblock/polymc/impl/PolyMapImpl.java +++ b/src/main/java/io/github/theepicblock/polymc/impl/PolyMapImpl.java @@ -170,7 +170,9 @@ public static ItemStack recoverOriginalItem(ItemStack input) { } else { // Return the original only if it's present var polymcOriginal = result.result().orElseThrow(); - return polymcOriginal.orElse(input); + ItemStack recovered_stack = polymcOriginal.orElse(input); + recovered_stack.setCount(input.getCount()); + return recovered_stack; } }