mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
f17519338b
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: masmc05 <masmc05@gmail.com>
19 lines
1.2 KiB
Diff
19 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: granny <contact@granny.dev>
|
|
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 1e77482a98869e464c1f0a873cff8febf7924c8c..ca7fbe4f8c1e1d2fb90095aa35be4dda3029c23e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
|
@@ -111,7 +111,7 @@ public class Inventory implements Container, Nameable {
|
|
}
|
|
|
|
private boolean hasRemainingSpaceForItem(ItemStack existingStack, ItemStack stack) {
|
|
- return !existingStack.isEmpty() && ItemStack.isSameItemSameComponents(existingStack, stack) && existingStack.isStackable() && existingStack.getCount() < this.getMaxStackSize(existingStack);
|
|
+ return !existingStack.isEmpty() && existingStack.isStackable() && existingStack.getCount() < this.getMaxStackSize(existingStack) && ItemStack.isSameItemSameComponents(existingStack, stack); // Paper - check if itemstack is stackable first
|
|
}
|
|
|
|
// CraftBukkit start - Watch method above! :D
|