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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user