2024-03-03 19:37:00 +01:00
|
|
|
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
|
2024-10-24 17:16:31 +02:00
|
|
|
index aaff1592876ac4a967e4fd47e4b6619a17d57867..ad82e5aeb565b23c3ec565fa60e1f31d1710bd4e 100644
|
2024-03-03 19:37:00 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
2024-10-24 17:16:31 +02:00
|
|
|
@@ -110,7 +110,7 @@ public class Inventory implements Container, Nameable {
|
2024-03-03 19:37:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private boolean hasRemainingSpaceForItem(ItemStack existingStack, ItemStack stack) {
|
2024-04-25 12:27:57 +02:00
|
|
|
- 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
|
2024-03-03 19:37:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// CraftBukkit start - Watch method above! :D
|