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