@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerStonecutter.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerStonecutter.java
|
||||
@@ -16,6 +16,13 @@
|
||||
@@ -15,6 +15,13 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
+
|
||||
public class ContainerStonecutter extends Container {
|
||||
|
||||
private final ContainerAccess containerAccess;
|
||||
@@ -29,6 +36,21 @@
|
||||
private Runnable l;
|
||||
public final IInventory inventory;
|
||||
private final InventoryCraftResult resultInventory;
|
||||
public static final int INPUT_SLOT = 0;
|
||||
@@ -34,6 +41,21 @@
|
||||
Runnable slotUpdateListener;
|
||||
public final IInventory container;
|
||||
final InventoryCraftResult resultContainer;
|
||||
+ // CraftBukkit start
|
||||
+ private CraftInventoryView bukkitEntity = null;
|
||||
+ private Player player;
|
||||
@@ -28,17 +28,17 @@
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+
|
||||
+ CraftInventoryStonecutter inventory = new CraftInventoryStonecutter(this.inventory, this.resultInventory);
|
||||
+ CraftInventoryStonecutter inventory = new CraftInventoryStonecutter(this.container, this.resultContainer);
|
||||
+ bukkitEntity = new CraftInventoryView(this.player, inventory, this);
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -48,6 +70,13 @@
|
||||
this(i, playerinventory, ContainerAccess.NULL);
|
||||
@@ -53,6 +75,13 @@
|
||||
ContainerStonecutter.this.a((IInventory) this);
|
||||
ContainerStonecutter.this.l.run();
|
||||
ContainerStonecutter.this.slotUpdateListener.run();
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
@@ -48,18 +48,21 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
};
|
||||
this.resultInventory = new InventoryCraftResult();
|
||||
this.containerAccess = containeraccess;
|
||||
@@ -95,10 +124,12 @@
|
||||
this.resultContainer = new InventoryCraftResult();
|
||||
this.access = containeraccess;
|
||||
@@ -100,6 +129,7 @@
|
||||
}
|
||||
|
||||
this.a(this.containerProperty);
|
||||
this.a(this.selectedRecipeIndex);
|
||||
+ player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
|
||||
}
|
||||
|
||||
public int i() {
|
||||
@@ -120,6 +150,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||
return a(this.containerAccess, entityhuman, Blocks.STONECUTTER);
|
||||
return a(this.access, entityhuman, Blocks.STONECUTTER);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user