From 691628ab5cc38c77b9c1a9bd884c7ce40b96373c Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 21 Nov 2016 21:56:17 +1100 Subject: [PATCH] Fix setCarryingChest not resizing horse inventory --- nms-patches/EntityHorseAbstract.patch | 8 ++++++-- .../org/bukkit/craftbukkit/entity/CraftChestedHorse.java | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/nms-patches/EntityHorseAbstract.patch b/nms-patches/EntityHorseAbstract.patch index 2fcf61efd9..aff173b0b3 100644 --- a/nms-patches/EntityHorseAbstract.patch +++ b/nms-patches/EntityHorseAbstract.patch @@ -16,8 +16,12 @@ public EntityHorseAbstract(World world) { super(world); -@@ -214,7 +216,7 @@ - protected void dx() { +@@ -211,10 +213,10 @@ + return 2; + } + +- protected void dx() { ++ public void dx() { // PAIL: protected-> public, rename InventoryHorseChest inventoryhorsechest = this.inventoryChest; - this.inventoryChest = new InventoryHorseChest("HorseChest", this.di()); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java index 3e5331e470..80e555e518 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java @@ -22,6 +22,8 @@ public abstract class CraftChestedHorse extends CraftAbstractHorse implements Ch @Override public void setCarryingChest(boolean chest) { + if (chest == isCarryingChest()) return; getHandle().setCarryingChest(chest); + getHandle().dx(); } }