mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
port PaperMC/Paper#10285
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
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] PaperPR #10285 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 deabb3400ee2406a8ec179a96d8cfd86f8edbbd6..c6a925cbd35eb33b27b90bfa8344ac7515d28b76 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||||
|
@@ -114,7 +114,7 @@ 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
|
||||||
Reference in New Issue
Block a user