From df1033f5f9f9f2ea1eeaf3f9cc71d12db561cda6 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 5 Jan 2017 15:03:22 +1100 Subject: [PATCH] SPIGOT-2989: Use existing horse inventory object. By: md_5 --- paper-server/nms-patches/ContainerHorse.patch | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paper-server/nms-patches/ContainerHorse.patch b/paper-server/nms-patches/ContainerHorse.patch index 739df2152c..f3c7a80b7a 100644 --- a/paper-server/nms-patches/ContainerHorse.patch +++ b/paper-server/nms-patches/ContainerHorse.patch @@ -1,10 +1,9 @@ --- a/net/minecraft/server/ContainerHorse.java +++ b/net/minecraft/server/ContainerHorse.java -@@ -1,11 +1,33 @@ +@@ -1,11 +1,31 @@ package net.minecraft.server; +// CraftBukkit start -+import org.bukkit.craftbukkit.inventory.CraftInventory; +import org.bukkit.craftbukkit.inventory.CraftInventoryView; +import org.bukkit.inventory.InventoryView; +// CraftBukkit end @@ -24,8 +23,7 @@ + return bukkitEntity; + } + -+ CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryHorse(this.a); -+ return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), inventory, this); ++ return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), a.getOwner().getInventory(), this); + } + public ContainerHorse(IInventory iinventory, final IInventory iinventory1, final EntityHorseAbstract entityhorseabstract, EntityHuman entityhuman) {