9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-30 20:39:15 +00:00
* Try to fix #472

* Fix carried data not sent

* Restore deletion of Hopper
This commit is contained in:
Lumine1909
2025-04-28 04:55:40 -04:00
committed by GitHub
parent c75affe591
commit 015eccb661
5 changed files with 157 additions and 40 deletions

View File

@@ -26,9 +26,7 @@ public class ShulkerBoxUtils {
public static ItemStack correctItemStackMaxStackSize(ItemStack itemStack) {
int trulyMaxStackSize = getItemStackMaxCount(itemStack);
if (itemStack.getMaxStackSize() != trulyMaxStackSize) {
org.bukkit.inventory.ItemStack bkStack = CraftItemStack.asBukkitCopy(itemStack);
bkStack.editMeta(meta -> meta.setMaxStackSize(trulyMaxStackSize));
itemStack = CraftItemStack.asNMSCopy(bkStack);
itemStack.set(DataComponents.MAX_STACK_SIZE, trulyMaxStackSize);
}
return itemStack;
}