SPIGOT-6487: Fix issue with villagers picking up items in certain situations
This commit is contained in:
parent
90a4d64a9a
commit
ebe18b9b0e
@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/world/InventorySubcontainer.java
|
--- a/net/minecraft/world/InventorySubcontainer.java
|
||||||
+++ b/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.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
@ -56,8 +56,10 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public InventorySubcontainer(InventorySubcontainer original) {
|
+ public InventorySubcontainer(InventorySubcontainer original) {
|
||||||
+ this.a = original.a;
|
+ this(original.a);
|
||||||
+ this.items = NonNullList.a(ItemStack.b, original.items.toArray(new ItemStack[0]));
|
+ for (int slot = 0; slot < original.a; slot++) {
|
||||||
|
+ this.items.set(slot, original.items.get(slot).cloneItemStack());
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public InventorySubcontainer(int i) {
|
public InventorySubcontainer(int i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user