summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/EntityHorse.java2
-rw-r--r--src/main/java/net/minecraft/server/InventoryHorseChest.java9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index fb411ed4..bc7acb97 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -328,7 +328,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
public void cH() { // CraftBukkit - private -> public
InventoryHorseChest inventoryhorsechest = this.inventoryChest;
- this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG());
+ this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG(), this); // CraftBukkit - add this horse
this.inventoryChest.a(this.getLocalizedName());
if (inventoryhorsechest != null) {
inventoryhorsechest.b(this);
diff --git a/src/main/java/net/minecraft/server/InventoryHorseChest.java b/src/main/java/net/minecraft/server/InventoryHorseChest.java
index 1fa3d5f4..d3a5ebe4 100644
--- a/src/main/java/net/minecraft/server/InventoryHorseChest.java
+++ b/src/main/java/net/minecraft/server/InventoryHorseChest.java
@@ -14,9 +14,14 @@ public class InventoryHorseChest extends InventorySubcontainer {
// CraftBukkit start
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
- public org.bukkit.entity.Player player;
+ private EntityHorse horse;
private int maxStack = MAX_STACK;
+ public InventoryHorseChest(String s, int i, EntityHorse horse) {
+ this(s, i);
+ this.horse = horse;
+ }
+
@Override
public ItemStack[] getContents() {
return this.items;
@@ -39,7 +44,7 @@ public class InventoryHorseChest extends InventorySubcontainer {
@Override
public org.bukkit.inventory.InventoryHolder getOwner() {
- return this.player;
+ return (org.bukkit.entity.Horse) this.horse.getBukkitEntity();
}
@Override