@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ContainerDispenser.java
|
||||
+++ b/net/minecraft/server/ContainerDispenser.java
|
||||
@@ -1,11 +1,24 @@
|
||||
@@ -1,8 +1,17 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -16,26 +16,30 @@
|
||||
+ private PlayerInventory player;
|
||||
+ // CraftBukkit end
|
||||
|
||||
public ContainerDispenser(IInventory iinventory, IInventory iinventory1) {
|
||||
this.items = iinventory1;
|
||||
public ContainerDispenser(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, new InventorySubcontainer(9));
|
||||
@@ -10,6 +19,10 @@
|
||||
|
||||
public ContainerDispenser(int i, PlayerInventory playerinventory, IInventory iinventory) {
|
||||
super(Containers.GENERIC_3X3, i);
|
||||
+ // CraftBukkit start - Save player
|
||||
+ // TODO: Should we check to make sure it really is an InventoryPlayer?
|
||||
+ this.player = (PlayerInventory)iinventory;
|
||||
+ this.player = playerinventory;
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
a(iinventory, 9);
|
||||
this.items = iinventory;
|
||||
iinventory.startOpen(playerinventory.player);
|
||||
@@ -37,6 +50,7 @@
|
||||
|
||||
int i;
|
||||
int j;
|
||||
@@ -29,6 +42,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||
return this.items.a(entityhuman);
|
||||
}
|
||||
|
||||
@@ -63,4 +77,17 @@
|
||||
|
||||
return itemstack;
|
||||
@@ -78,4 +92,17 @@
|
||||
super.b(entityhuman);
|
||||
this.items.closeContainer(entityhuman);
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
|
||||
Reference in New Issue
Block a user