mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
SPIGOT-2000: Picking up items to shield slot working inconsistently when inventory is full
This commit is contained in:
@@ -85,6 +85,12 @@
|
||||
+ }
|
||||
+ if (remains <= 0) return itemstack.getCount();
|
||||
+ }
|
||||
+ ItemStack offhandItemStack = this.getItem(this.items.size() + this.armor.size());
|
||||
+ if (this.a(offhandItemStack, itemstack)) {
|
||||
+ remains -= (offhandItemStack.getMaxStackSize() < this.getMaxStackSize() ? offhandItemStack.getMaxStackSize() : this.getMaxStackSize()) - offhandItemStack.getCount();
|
||||
+ }
|
||||
+ if (remains <= 0) return itemstack.getCount();
|
||||
+
|
||||
+ return itemstack.getCount() - remains;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
Reference in New Issue
Block a user