mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
--- a/net/minecraft/server/ContainerHorse.java
|
|
+++ b/net/minecraft/server/ContainerHorse.java
|
|
@@ -1,13 +1,34 @@
|
|
package net.minecraft.server;
|
|
|
|
import javax.annotation.Nullable;
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
|
+import org.bukkit.inventory.InventoryView;
|
|
+// CraftBukkit end
|
|
|
|
public class ContainerHorse extends Container {
|
|
|
|
private final IInventory a;
|
|
private final EntityHorse f;
|
|
|
|
+ // CraftBukkit start
|
|
+ org.bukkit.craftbukkit.inventory.CraftInventoryView bukkitEntity;
|
|
+ PlayerInventory player;
|
|
+
|
|
+ @Override
|
|
+ public InventoryView getBukkitView() {
|
|
+ if (bukkitEntity != null) {
|
|
+ return bukkitEntity;
|
|
+ }
|
|
+
|
|
+ CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryHorse(this.a);
|
|
+ return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), inventory, this);
|
|
+ }
|
|
+
|
|
public ContainerHorse(IInventory iinventory, final IInventory iinventory1, final EntityHorse entityhorse, EntityHuman entityhuman) {
|
|
+ player = (PlayerInventory) iinventory;
|
|
+ // CraftBukkit end
|
|
this.a = iinventory1;
|
|
this.f = entityhorse;
|
|
boolean flag = true;
|