mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-10 22:05:10 +01:00
SPIGOT-6487: Fix issue with villagers picking up items in certain situations
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e42f86eb2d
commit
1ac55ed273
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/InventorySubcontainer.java
|
||||
+++ b/net/minecraft/world/InventorySubcontainer.java
|
||||
@@ -13,13 +13,69 @@
|
||||
@@ -13,13 +13,71 @@
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@ -56,8 +56,10 @@
|
||||
+ }
|
||||
+
|
||||
+ public InventorySubcontainer(InventorySubcontainer original) {
|
||||
+ this.a = original.a;
|
||||
+ this.items = NonNullList.a(ItemStack.b, original.items.toArray(new ItemStack[0]));
|
||||
+ this(original.a);
|
||||
+ for (int slot = 0; slot < original.a; slot++) {
|
||||
+ this.items.set(slot, original.items.get(slot).cloneItemStack());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public InventorySubcontainer(int i) {
|
||||
|
Loading…
Reference in New Issue
Block a user