@@ -1,17 +1,17 @@
|
||||
--- a/net/minecraft/server/ContainerWorkbench.java
|
||||
+++ b/net/minecraft/server/ContainerWorkbench.java
|
||||
@@ -1,6 +1,10 @@
|
||||
package net.minecraft.server;
|
||||
@@ -2,12 +2,21 @@
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
+// CraftBukkit end
|
||||
|
||||
+
|
||||
public class ContainerWorkbench extends ContainerRecipeBook<InventoryCrafting> {
|
||||
|
||||
@@ -8,6 +12,10 @@
|
||||
private final InventoryCrafting craftInventory;
|
||||
private final InventoryCraftResult resultInventory;
|
||||
public final ContainerAccess containerAccess;
|
||||
private final EntityHuman f;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
public ContainerWorkbench(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -15,8 +23,12 @@
|
||||
@@ -15,8 +24,12 @@
|
||||
|
||||
public ContainerWorkbench(int i, PlayerInventory playerinventory, ContainerAccess containeraccess) {
|
||||
super(Containers.CRAFTING, i);
|
||||
@@ -36,7 +36,7 @@
|
||||
this.containerAccess = containeraccess;
|
||||
this.f = playerinventory.player;
|
||||
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35)));
|
||||
@@ -42,7 +54,7 @@
|
||||
@@ -42,7 +55,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if (!world.isClientSide) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) entityhuman;
|
||||
ItemStack itemstack = ItemStack.b;
|
||||
@@ -55,6 +67,7 @@
|
||||
@@ -55,6 +68,7 @@
|
||||
itemstack = recipecrafting.a(inventorycrafting);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
inventorycraftresult.setItem(0, itemstack);
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(i, 0, itemstack));
|
||||
@@ -64,7 +77,7 @@
|
||||
@@ -64,7 +78,7 @@
|
||||
@Override
|
||||
public void a(IInventory iinventory) {
|
||||
this.containerAccess.a((world, blockposition) -> {
|
||||
@@ -62,7 +62,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,6 +107,7 @@
|
||||
@@ -94,6 +108,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -70,7 +70,7 @@
|
||||
return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE);
|
||||
}
|
||||
|
||||
@@ -168,4 +182,17 @@
|
||||
@@ -168,4 +183,17 @@
|
||||
public int h() {
|
||||
return this.craftInventory.f();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user