public ContainerBeacon(IInventory iinventory, IInventory iinventory1) {
+ player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
this.a = iinventory1;
this.a((Slot) (this.f = new SlotBeacon(this, iinventory1, 0, 136, 110)));
byte b0 = 36;
@@ -35,6 +42,7 @@
}
public boolean a(EntityHuman entityhuman) {
+ if (!this.checkReachable) return true; // CraftBukkit
return this.a.a(entityhuman);
}
@@ -83,4 +91,17 @@
return itemstack;
}
+
+ // CraftBukkit start
+ @Override
+ public CraftInventoryView getBukkitView() {
+ if (bukkitEntity != null) {
+ return bukkitEntity;
+ }
+
+ org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon((TileEntityBeacon) this.a); // TODO - check this
+ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);