2015-05-25 20:37:24 +10:00
|
|
|
--- a/net/minecraft/server/ContainerHorse.java
|
|
|
|
+++ b/net/minecraft/server/ContainerHorse.java
|
2017-01-05 15:03:22 +11:00
|
|
|
@@ -1,11 +1,31 @@
|
2014-11-26 08:32:16 +11:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
|
|
|
+import org.bukkit.inventory.InventoryView;
|
|
|
|
+// CraftBukkit end
|
2016-11-17 12:41:03 +11:00
|
|
|
+
|
2014-11-26 08:32:16 +11:00
|
|
|
public class ContainerHorse extends Container {
|
|
|
|
|
2016-06-09 11:43:49 +10:00
|
|
|
private final IInventory a;
|
2016-11-17 12:41:03 +11:00
|
|
|
private final EntityHorseAbstract f;
|
2015-02-26 22:41:06 +00:00
|
|
|
|
2014-11-26 08:32:16 +11:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ org.bukkit.craftbukkit.inventory.CraftInventoryView bukkitEntity;
|
|
|
|
+ PlayerInventory player;
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public InventoryView getBukkitView() {
|
|
|
|
+ if (bukkitEntity != null) {
|
|
|
|
+ return bukkitEntity;
|
|
|
|
+ }
|
|
|
|
+
|
2017-01-05 15:03:22 +11:00
|
|
|
+ return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), a.getOwner().getInventory(), this);
|
2014-11-26 08:32:16 +11:00
|
|
|
+ }
|
2015-02-26 22:41:06 +00:00
|
|
|
+
|
2016-11-17 12:41:03 +11:00
|
|
|
public ContainerHorse(IInventory iinventory, final IInventory iinventory1, final EntityHorseAbstract entityhorseabstract, EntityHuman entityhuman) {
|
2014-11-26 08:32:16 +11:00
|
|
|
+ player = (PlayerInventory) iinventory;
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.a = iinventory1;
|
2016-11-17 12:41:03 +11:00
|
|
|
this.f = entityhorseabstract;
|
2016-06-09 11:43:49 +10:00
|
|
|
boolean flag = true;
|