diff --git a/patches/server/0040-Stackable-ShulkerBoxes.patch b/patches/server/0040-Stackable-ShulkerBoxes.patch index b3613c0..75e7f0a 100644 --- a/patches/server/0040-Stackable-ShulkerBoxes.patch +++ b/patches/server/0040-Stackable-ShulkerBoxes.patch @@ -418,10 +418,10 @@ index f7a6296773defc95215bdf36d8ea105cf9590a9e..5f394cda052271b6ecfafc325733e5ae ignoreTileUpdates = true; // Paper - Perf: Optimize Hoppers diff --git a/src/main/java/org/leavesmc/leaves/util/ShulkerBoxUtils.java b/src/main/java/org/leavesmc/leaves/util/ShulkerBoxUtils.java new file mode 100644 -index 0000000000000000000000000000000000000000..bcb13315000a16f4f2dbdcbef751940743ce297d +index 0000000000000000000000000000000000000000..64344eb9310690dd31e7fadcfb29ed8dda559716 --- /dev/null +++ b/src/main/java/org/leavesmc/leaves/util/ShulkerBoxUtils.java -@@ -0,0 +1,38 @@ +@@ -0,0 +1,39 @@ +package org.leavesmc.leaves.util; + +import net.minecraft.core.component.DataComponents; @@ -429,6 +429,7 @@ index 0000000000000000000000000000000000000000..bcb13315000a16f4f2dbdcbef7519407 +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.ItemContainerContents; +import net.minecraft.world.level.block.ShulkerBoxBlock; ++import org.bukkit.craftbukkit.inventory.CraftItemStack; +import org.jetbrains.annotations.NotNull; +import org.leavesmc.leaves.LeavesConfig; + @@ -440,18 +441,18 @@ index 0000000000000000000000000000000000000000..bcb13315000a16f4f2dbdcbef7519407 + + public static int getItemStackMaxCount(ItemStack stack) { + if (LeavesConfig.shulkerBoxStackSize > 1 && stack.getItem() instanceof BlockItem bi && -+ bi.getBlock() instanceof ShulkerBoxBlock && org.leavesmc.leaves.util.ShulkerBoxUtils.shulkerBoxNoItem(stack)) { -+ return org.leavesmc.leaves.LeavesConfig.shulkerBoxStackSize; ++ bi.getBlock() instanceof ShulkerBoxBlock && shulkerBoxNoItem(stack)) { ++ return LeavesConfig.shulkerBoxStackSize; + } + return stack.getMaxStackSize(); + } + -+ public static net.minecraft.world.item.ItemStack correctItemStackMaxStackSize(net.minecraft.world.item.ItemStack itemStack) { -+ int trulyMaxStackSize = org.leavesmc.leaves.util.ShulkerBoxUtils.getItemStackMaxCount(itemStack); ++ public static ItemStack correctItemStackMaxStackSize(ItemStack itemStack) { ++ int trulyMaxStackSize = getItemStackMaxCount(itemStack); + if (itemStack.getMaxStackSize() != trulyMaxStackSize) { -+ org.bukkit.inventory.ItemStack bkStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemStack); ++ org.bukkit.inventory.ItemStack bkStack = CraftItemStack.asBukkitCopy(itemStack); + bkStack.editMeta(meta -> meta.setMaxStackSize(trulyMaxStackSize)); -+ itemStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bkStack); ++ itemStack = CraftItemStack.asNMSCopy(bkStack); + } + return itemStack; + }