From b217c79e481faba72469dc65b555176b1f6b2d25 Mon Sep 17 00:00:00 2001 From: Gugle Date: Sat, 13 Apr 2024 15:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BA=9C=E6=A7=BD=E5=BE=80?= =?UTF-8?q?=E9=9B=95=E7=BA=B9=E4=B9=A6=E6=9E=B6=E4=B8=AD=E8=BF=9B=E4=B9=A6?= =?UTF-8?q?=E6=97=B6=E4=BC=9A=E5=90=9E=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixed #262 --- .../dubhe/anvilcraft/api/depository/ItemDepositoryHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/dev/dubhe/anvilcraft/api/depository/ItemDepositoryHelper.java b/common/src/main/java/dev/dubhe/anvilcraft/api/depository/ItemDepositoryHelper.java index 691f95616..17285cc4f 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/api/depository/ItemDepositoryHelper.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/api/depository/ItemDepositoryHelper.java @@ -60,8 +60,9 @@ public static void exportToTarget( int amountToInsert = sourceStack.getCount() - remainder.getCount(); if (amountToInsert > 0) { sourceStack = source.extract(srcIndex, Math.min(maxAmount, amountToInsert), false); - insertItem(target, sourceStack, false); + remainder = insertItem(target, sourceStack, false); maxAmount -= Math.min(maxAmount, amountToInsert); + source.insert(srcIndex, remainder, false); } if (maxAmount <= 0) return; }