@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ContainerBeacon.java
|
||||
+++ b/net/minecraft/server/ContainerBeacon.java
|
||||
@@ -1,11 +1,18 @@
|
||||
@@ -1,11 +1,17 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
||||
@@ -8,26 +8,33 @@
|
||||
public class ContainerBeacon extends Container {
|
||||
|
||||
private final IInventory beacon;
|
||||
private final ContainerBeacon.SlotBeacon f;
|
||||
private final ContainerBeacon.SlotBeacon d;
|
||||
private final ContainerAccess containerAccess;
|
||||
private final IContainerProperties containerProperties;
|
||||
+ // CraftBukkit start
|
||||
+ private CraftInventoryView bukkitEntity = null;
|
||||
+ private PlayerInventory player;
|
||||
+ // CraftBukkit end
|
||||
|
||||
public ContainerBeacon(IInventory iinventory, IInventory iinventory1) {
|
||||
+ player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
|
||||
this.beacon = iinventory1;
|
||||
this.f = new ContainerBeacon.SlotBeacon(iinventory1, 0, 136, 110);
|
||||
this.a((Slot) this.f);
|
||||
@@ -48,6 +55,7 @@
|
||||
}
|
||||
public ContainerBeacon(int i, IInventory iinventory) {
|
||||
this(i, iinventory, new ContainerProperties(3), ContainerAccess.a);
|
||||
@@ -13,6 +19,7 @@
|
||||
|
||||
public ContainerBeacon(int i, IInventory iinventory, IContainerProperties icontainerproperties, ContainerAccess containeraccess) {
|
||||
super(Containers.BEACON, i);
|
||||
+ player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
|
||||
this.beacon = new InventorySubcontainer(1) {
|
||||
@Override
|
||||
public boolean b(int j, ItemStack itemstack) {
|
||||
@@ -62,6 +69,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||
return this.beacon.a(entityhuman);
|
||||
return a(this.containerAccess, entityhuman, Blocks.BEACON);
|
||||
}
|
||||
|
||||
@@ -113,4 +121,17 @@
|
||||
@@ -145,4 +153,17 @@
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -39,7 +46,7 @@
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+
|
||||
+ org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon((TileEntityBeacon) this.beacon); // TODO - check this
|
||||
+ org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon(this.beacon);
|
||||
+ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user