From 357b573a19943118a96a8a76142dabd1cb6d9643 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 16 Aug 2017 20:47:23 +1000 Subject: [PATCH] SPIGOT-3513: Correctly set size for freshly spawned Minecarts --- nms-patches/EntityMinecartContainer.patch | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nms-patches/EntityMinecartContainer.patch b/nms-patches/EntityMinecartContainer.patch index 15037a6063..19c2f366cf 100644 --- a/nms-patches/EntityMinecartContainer.patch +++ b/nms-patches/EntityMinecartContainer.patch @@ -14,7 +14,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements ITileInventory, ILootable { -@@ -11,6 +18,42 @@ +@@ -11,15 +18,51 @@ private MinecraftKey c; private long d; @@ -56,7 +56,18 @@ + public EntityMinecartContainer(World world) { super(world); - this.items = NonNullList.a(36, ItemStack.a); +- this.items = NonNullList.a(36, ItemStack.a); ++ this.items = NonNullList.a(this.getSize(), ItemStack.a); // CraftBukkit - SPIGOT-3513 + this.b = true; + } + + public EntityMinecartContainer(World world, double d0, double d1, double d2) { + super(world, d0, d1, d2); +- this.items = NonNullList.a(36, ItemStack.a); ++ this.items = NonNullList.a(this.getSize(), ItemStack.a); // CraftBukkit - SPIGOT-3513 + this.b = true; + } + @@ -93,7 +136,7 @@ }