diff --git a/LICENSE.md b/LICENSE.md index 378a081dd6..5cdaa970c6 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -63,4 +63,5 @@ Ollie <69084614+olijeffers0n@users.noreply.github.com> Oliwier Miodun aerulion Lukas Planz +granny ``` diff --git a/patches/server/check-if-itemstack-is-stackable-first.patch b/patches/server/check-if-itemstack-is-stackable-first.patch new file mode 100644 index 0000000000..af78578433 --- /dev/null +++ b/patches/server/check-if-itemstack-is-stackable-first.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: granny +Date: Sat, 24 Feb 2024 19:33:01 -0800 +Subject: [PATCH] check if itemstack is stackable first + + +diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java ++++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java +@@ -0,0 +0,0 @@ public class Inventory implements Container, Nameable { + } + + private boolean hasRemainingSpaceForItem(ItemStack existingStack, ItemStack stack) { +- return !existingStack.isEmpty() && ItemStack.isSameItemSameTags(existingStack, stack) && existingStack.isStackable() && existingStack.getCount() < existingStack.getMaxStackSize() && existingStack.getCount() < this.getMaxStackSize(); ++ return !existingStack.isEmpty() && existingStack.isStackable() && existingStack.getCount() < existingStack.getMaxStackSize() && existingStack.getCount() < this.getMaxStackSize() && ItemStack.isSameItemSameTags(existingStack, stack); // Paper - check if itemstack is stackable first + } + + // CraftBukkit start - Watch method above! :D