@@ -1,13 +1,15 @@
|
||||
--- a/net/minecraft/server/Container.java
|
||||
+++ b/net/minecraft/server/Container.java
|
||||
@@ -7,6 +7,18 @@
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/inventory/Container.java
|
||||
+++ b/net/minecraft/world/inventory/Container.java
|
||||
@@ -21,6 +21,20 @@
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.entity.TileEntity;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import java.util.HashMap;
|
||||
+import java.util.Map;
|
||||
+import net.minecraft.network.chat.IChatBaseComponent;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||
+import org.bukkit.event.Event.Result;
|
||||
@@ -19,7 +21,7 @@
|
||||
public abstract class Container {
|
||||
|
||||
public NonNullList<ItemStack> items = NonNullList.a();
|
||||
@@ -21,6 +33,27 @@
|
||||
@@ -35,6 +49,27 @@
|
||||
private final List<ICrafting> listeners = Lists.newArrayList();
|
||||
private final Set<EntityHuman> k = Sets.newHashSet();
|
||||
|
||||
@@ -47,7 +49,7 @@
|
||||
protected Container(@Nullable Containers<?> containers, int i) {
|
||||
this.e = containers;
|
||||
this.windowId = i;
|
||||
@@ -202,6 +235,7 @@
|
||||
@@ -216,6 +251,7 @@
|
||||
k = playerinventory.getCarried().getCount();
|
||||
Iterator iterator = this.i.iterator();
|
||||
|
||||
@@ -55,7 +57,7 @@
|
||||
while (iterator.hasNext()) {
|
||||
Slot slot1 = (Slot) iterator.next();
|
||||
ItemStack itemstack3 = playerinventory.getCarried();
|
||||
@@ -217,12 +251,48 @@
|
||||
@@ -231,12 +267,48 @@
|
||||
}
|
||||
|
||||
k -= itemstack4.getCount() - j1;
|
||||
@@ -107,7 +109,7 @@
|
||||
}
|
||||
|
||||
this.d();
|
||||
@@ -239,8 +309,11 @@
|
||||
@@ -253,8 +325,11 @@
|
||||
if (i == -999) {
|
||||
if (!playerinventory.getCarried().isEmpty()) {
|
||||
if (j == 0) {
|
||||
@@ -120,7 +122,7 @@
|
||||
}
|
||||
|
||||
if (j == 1) {
|
||||
@@ -328,6 +401,15 @@
|
||||
@@ -342,6 +417,15 @@
|
||||
}
|
||||
|
||||
slot2.d();
|
||||
@@ -136,7 +138,7 @@
|
||||
}
|
||||
}
|
||||
} else if (inventoryclicktype == InventoryClickType.SWAP) {
|
||||
@@ -430,8 +512,11 @@
|
||||
@@ -444,8 +528,11 @@
|
||||
PlayerInventory playerinventory = entityhuman.inventory;
|
||||
|
||||
if (!playerinventory.getCarried().isEmpty()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ContainerAccess.java
|
||||
+++ b/net/minecraft/server/ContainerAccess.java
|
||||
@@ -6,6 +6,20 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerAccess.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerAccess.java
|
||||
@@ -8,6 +8,20 @@
|
||||
|
||||
public interface ContainerAccess {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
ContainerAccess a = new ContainerAccess() {
|
||||
@Override
|
||||
public <T> Optional<T> a(BiFunction<World, BlockPosition, T> bifunction) {
|
||||
@@ -15,6 +29,18 @@
|
||||
@@ -17,6 +31,18 @@
|
||||
|
||||
static ContainerAccess at(final World world, final BlockPosition blockposition) {
|
||||
return new ContainerAccess() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ContainerAnvil.java
|
||||
+++ b/net/minecraft/server/ContainerAnvil.java
|
||||
@@ -6,12 +6,20 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerAnvil.java
|
||||
@@ -19,12 +19,20 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
public ContainerAnvil(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -85,7 +93,7 @@
|
||||
@@ -98,7 +106,7 @@
|
||||
byte b1 = 0;
|
||||
|
||||
if (itemstack.isEmpty()) {
|
||||
@@ -30,7 +30,7 @@
|
||||
this.levelCost.set(0);
|
||||
} else {
|
||||
ItemStack itemstack1 = itemstack.cloneItemStack();
|
||||
@@ -103,7 +111,7 @@
|
||||
@@ -116,7 +124,7 @@
|
||||
if (itemstack1.e() && itemstack1.getItem().a(itemstack, itemstack2)) {
|
||||
k = Math.min(itemstack1.getDamage(), itemstack1.h() / 4);
|
||||
if (k <= 0) {
|
||||
@@ -39,7 +39,7 @@
|
||||
this.levelCost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -118,7 +126,7 @@
|
||||
@@ -131,7 +139,7 @@
|
||||
this.h = i1;
|
||||
} else {
|
||||
if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.e())) {
|
||||
@@ -48,7 +48,7 @@
|
||||
this.levelCost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -208,7 +216,7 @@
|
||||
@@ -221,7 +229,7 @@
|
||||
}
|
||||
|
||||
if (flag2 && !flag1) {
|
||||
@@ -57,7 +57,7 @@
|
||||
this.levelCost.set(0);
|
||||
return;
|
||||
}
|
||||
@@ -232,11 +240,11 @@
|
||||
@@ -245,11 +253,11 @@
|
||||
itemstack1 = ItemStack.b;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
itemstack1 = ItemStack.b;
|
||||
}
|
||||
|
||||
@@ -255,7 +263,7 @@
|
||||
@@ -268,7 +276,7 @@
|
||||
EnchantmentManager.a(map, itemstack1);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
this.c();
|
||||
}
|
||||
}
|
||||
@@ -278,4 +286,18 @@
|
||||
@@ -291,4 +299,18 @@
|
||||
|
||||
this.e();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/ContainerAnvilAbstract.java
|
||||
+++ b/net/minecraft/server/ContainerAnvilAbstract.java
|
||||
@@ -79,6 +79,7 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerAnvilAbstract.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerAnvilAbstract.java
|
||||
@@ -85,6 +85,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
--- a/net/minecraft/server/ContainerBeacon.java
|
||||
+++ b/net/minecraft/server/ContainerBeacon.java
|
||||
@@ -1,11 +1,17 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerBeacon.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerBeacon.java
|
||||
@@ -8,12 +8,21 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.player.PlayerInventory;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class ContainerBeacon extends Container {
|
||||
|
||||
@@ -18,7 +22,7 @@
|
||||
|
||||
public ContainerBeacon(int i, IInventory iinventory) {
|
||||
this(i, iinventory, new ContainerProperties(3), ContainerAccess.a);
|
||||
@@ -13,6 +19,7 @@
|
||||
@@ -21,6 +30,7 @@
|
||||
|
||||
public ContainerBeacon(int i, IInventory iinventory, IContainerProperties icontainerproperties, ContainerAccess containeraccess) {
|
||||
super(Containers.BEACON, i);
|
||||
@@ -26,7 +30,7 @@
|
||||
this.beacon = new InventorySubcontainer(1) {
|
||||
@Override
|
||||
public boolean b(int j, ItemStack itemstack) {
|
||||
@@ -62,6 +69,7 @@
|
||||
@@ -70,6 +80,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -34,7 +38,7 @@
|
||||
return a(this.containerAccess, entityhuman, Blocks.BEACON);
|
||||
}
|
||||
|
||||
@@ -143,4 +151,17 @@
|
||||
@@ -151,4 +162,17 @@
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerBrewingStand.java
|
||||
+++ b/net/minecraft/server/ContainerBrewingStand.java
|
||||
@@ -1,17 +1,28 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerBrewingStand.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerBrewingStand.java
|
||||
@@ -13,18 +13,29 @@
|
||||
import net.minecraft.world.item.alchemy.PotionRegistry;
|
||||
import net.minecraft.world.item.alchemy.PotionUtil;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
|
||||
@@ -29,7 +30,7 @@
|
||||
a(iinventory, 5);
|
||||
a(icontainerproperties, 2);
|
||||
this.brewingStand = iinventory;
|
||||
@@ -39,6 +50,7 @@
|
||||
@@ -52,6 +63,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -37,7 +38,7 @@
|
||||
return this.brewingStand.a(entityhuman);
|
||||
}
|
||||
|
||||
@@ -171,4 +183,17 @@
|
||||
@@ -184,4 +196,17 @@
|
||||
return item == Items.POTION || item == Items.SPLASH_POTION || item == Items.LINGERING_POTION || item == Items.GLASS_BOTTLE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerCartography.java
|
||||
+++ b/net/minecraft/server/ContainerCartography.java
|
||||
@@ -1,7 +1,29 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerCartography.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerCartography.java
|
||||
@@ -13,8 +13,30 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.saveddata.maps.WorldMap;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -30,7 +31,7 @@
|
||||
private final ContainerAccess containerAccess;
|
||||
private long e;
|
||||
public final IInventory inventory;
|
||||
@@ -19,6 +41,13 @@
|
||||
@@ -32,6 +54,13 @@
|
||||
ContainerCartography.this.a((IInventory) this);
|
||||
super.update();
|
||||
}
|
||||
@@ -44,7 +45,7 @@
|
||||
};
|
||||
this.resultInventory = new InventoryCraftResult() {
|
||||
@Override
|
||||
@@ -26,6 +55,13 @@
|
||||
@@ -39,6 +68,13 @@
|
||||
ContainerCartography.this.a((IInventory) this);
|
||||
super.update();
|
||||
}
|
||||
@@ -58,7 +59,7 @@
|
||||
};
|
||||
this.containerAccess = containeraccess;
|
||||
this.a(new Slot(this.inventory, 0, 15, 15) {
|
||||
@@ -78,10 +114,12 @@
|
||||
@@ -91,10 +127,12 @@
|
||||
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
--- a/net/minecraft/server/ContainerChest.java
|
||||
+++ b/net/minecraft/server/ContainerChest.java
|
||||
@@ -1,9 +1,37 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerChest.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerChest.java
|
||||
@@ -6,10 +6,39 @@
|
||||
import net.minecraft.world.entity.player.PlayerInventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.InventoryLargeChest;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
+// CraftBukkit end
|
||||
@@ -38,7 +40,7 @@
|
||||
|
||||
private ContainerChest(Containers<?> containers, int i, PlayerInventory playerinventory, int j) {
|
||||
this(containers, i, playerinventory, new InventorySubcontainer(9 * j), j);
|
||||
@@ -49,6 +77,10 @@
|
||||
@@ -55,6 +84,10 @@
|
||||
iinventory.startOpen(playerinventory.player);
|
||||
int k = (this.d - 4) * 18;
|
||||
|
||||
@@ -49,7 +51,7 @@
|
||||
int l;
|
||||
int i1;
|
||||
|
||||
@@ -72,6 +104,7 @@
|
||||
@@ -78,6 +111,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerDispenser.java
|
||||
+++ b/net/minecraft/server/ContainerDispenser.java
|
||||
@@ -1,8 +1,17 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerDispenser.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerDispenser.java
|
||||
@@ -6,9 +6,18 @@
|
||||
import net.minecraft.world.entity.player.PlayerInventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
@@ -18,7 +19,7 @@
|
||||
|
||||
public ContainerDispenser(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, new InventorySubcontainer(9));
|
||||
@@ -10,6 +19,10 @@
|
||||
@@ -16,6 +25,10 @@
|
||||
|
||||
public ContainerDispenser(int i, PlayerInventory playerinventory, IInventory iinventory) {
|
||||
super(Containers.GENERIC_3X3, i);
|
||||
@@ -29,7 +30,7 @@
|
||||
a(iinventory, 9);
|
||||
this.items = iinventory;
|
||||
iinventory.startOpen(playerinventory.player);
|
||||
@@ -37,6 +50,7 @@
|
||||
@@ -43,6 +56,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -37,7 +38,7 @@
|
||||
return this.items.a(entityhuman);
|
||||
}
|
||||
|
||||
@@ -78,4 +92,17 @@
|
||||
@@ -84,4 +98,17 @@
|
||||
super.b(entityhuman);
|
||||
this.items.closeContainer(entityhuman);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
--- a/net/minecraft/server/ContainerEnchantTable.java
|
||||
+++ b/net/minecraft/server/ContainerEnchantTable.java
|
||||
@@ -3,6 +3,20 @@
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
--- a/net/minecraft/world/inventory/ContainerEnchantTable.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerEnchantTable.java
|
||||
@@ -20,6 +20,21 @@
|
||||
import net.minecraft.world.item.enchantment.WeightedRandomEnchant;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.Map;
|
||||
+import net.minecraft.world.item.enchantment.Enchantment;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryEnchanting;
|
||||
@@ -21,7 +22,7 @@
|
||||
public class ContainerEnchantTable extends Container {
|
||||
|
||||
private final IInventory enchantSlots;
|
||||
@@ -12,6 +26,10 @@
|
||||
@@ -29,6 +44,10 @@
|
||||
public final int[] costs;
|
||||
public final int[] enchantments;
|
||||
public final int[] levels;
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
public ContainerEnchantTable(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -25,6 +43,13 @@
|
||||
@@ -42,6 +61,13 @@
|
||||
super.update();
|
||||
ContainerEnchantTable.this.a((IInventory) this);
|
||||
}
|
||||
@@ -46,7 +47,7 @@
|
||||
};
|
||||
this.h = new Random();
|
||||
this.i = ContainerProperty.a();
|
||||
@@ -72,6 +97,9 @@
|
||||
@@ -89,6 +115,9 @@
|
||||
this.a(ContainerProperty.a(this.levels, 0));
|
||||
this.a(ContainerProperty.a(this.levels, 1));
|
||||
this.a(ContainerProperty.a(this.levels, 2));
|
||||
@@ -56,7 +57,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -79,7 +107,7 @@
|
||||
@@ -96,7 +125,7 @@
|
||||
if (iinventory == this.enchantSlots) {
|
||||
ItemStack itemstack = iinventory.getItem(0);
|
||||
|
||||
@@ -65,7 +66,7 @@
|
||||
this.containerAccess.a((world, blockposition) -> {
|
||||
int i = 0;
|
||||
|
||||
@@ -135,12 +163,47 @@
|
||||
@@ -152,12 +181,47 @@
|
||||
if (list != null && !list.isEmpty()) {
|
||||
WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) list.get(this.h.nextInt(list.size()));
|
||||
|
||||
@@ -114,7 +115,7 @@
|
||||
this.c();
|
||||
});
|
||||
} else {
|
||||
@@ -167,9 +230,24 @@
|
||||
@@ -184,9 +248,24 @@
|
||||
ItemStack itemstack2 = itemstack;
|
||||
List<WeightedRandomEnchant> list = this.a(itemstack, i, this.costs[i]);
|
||||
|
||||
@@ -141,7 +142,7 @@
|
||||
|
||||
if (flag) {
|
||||
itemstack2 = new ItemStack(Items.ENCHANTED_BOOK);
|
||||
@@ -182,16 +260,29 @@
|
||||
@@ -199,16 +278,29 @@
|
||||
this.enchantSlots.setItem(0, itemstack2);
|
||||
}
|
||||
|
||||
@@ -177,7 +178,7 @@
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
itemstack1.subtract(j);
|
||||
if (itemstack1.isEmpty()) {
|
||||
@@ -238,6 +329,7 @@
|
||||
@@ -255,6 +347,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -185,7 +186,7 @@
|
||||
return a(this.containerAccess, entityhuman, Blocks.ENCHANTING_TABLE);
|
||||
}
|
||||
|
||||
@@ -289,4 +381,17 @@
|
||||
@@ -306,4 +399,17 @@
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerFurnace.java
|
||||
+++ b/net/minecraft/server/ContainerFurnace.java
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
@@ -14,6 +14,11 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.entity.TileEntityFurnace;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
|
||||
@@ -11,7 +12,7 @@
|
||||
public abstract class ContainerFurnace extends ContainerRecipeBook<IInventory> {
|
||||
|
||||
private final IInventory furnace;
|
||||
@@ -8,6 +13,22 @@
|
||||
@@ -22,6 +27,22 @@
|
||||
private final Recipes<? extends RecipeCooking> f;
|
||||
private final RecipeBookType g;
|
||||
|
||||
@@ -34,7 +35,7 @@
|
||||
protected ContainerFurnace(Containers<?> containers, Recipes<? extends RecipeCooking> recipes, RecipeBookType recipebooktype, int i, PlayerInventory playerinventory) {
|
||||
this(containers, recipes, recipebooktype, i, playerinventory, new InventorySubcontainer(3), new ContainerProperties(4));
|
||||
}
|
||||
@@ -24,6 +45,7 @@
|
||||
@@ -38,6 +59,7 @@
|
||||
this.a(new Slot(iinventory, 0, 56, 17));
|
||||
this.a((Slot) (new SlotFurnaceFuel(this, iinventory, 1, 56, 53)));
|
||||
this.a((Slot) (new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35)));
|
||||
@@ -42,7 +43,7 @@
|
||||
|
||||
int j;
|
||||
|
||||
@@ -55,7 +77,7 @@
|
||||
@@ -69,7 +91,7 @@
|
||||
|
||||
@Override
|
||||
public void a(boolean flag, IRecipe<?> irecipe, EntityPlayer entityplayer) {
|
||||
@@ -51,7 +52,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -80,6 +102,7 @@
|
||||
@@ -94,6 +116,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -59,7 +60,7 @@
|
||||
return this.furnace.a(entityhuman);
|
||||
}
|
||||
|
||||
@@ -135,7 +158,7 @@
|
||||
@@ -149,7 +172,7 @@
|
||||
}
|
||||
|
||||
protected boolean a(ItemStack itemstack) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerGrindstone.java
|
||||
+++ b/net/minecraft/server/ContainerGrindstone.java
|
||||
@@ -5,8 +5,30 @@
|
||||
import java.util.Map.Entry;
|
||||
import java.util.stream.Collectors;
|
||||
--- a/net/minecraft/world/inventory/ContainerGrindstone.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerGrindstone.java
|
||||
@@ -17,8 +17,30 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -31,7 +31,7 @@
|
||||
private final IInventory resultInventory;
|
||||
private final IInventory craftInventory;
|
||||
private final ContainerAccess containerAccess;
|
||||
@@ -24,6 +46,13 @@
|
||||
@@ -36,6 +58,13 @@
|
||||
super.update();
|
||||
ContainerGrindstone.this.a((IInventory) this);
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
};
|
||||
this.containerAccess = containeraccess;
|
||||
this.a(new Slot(this.craftInventory, 0, 49, 19) {
|
||||
@@ -108,6 +137,7 @@
|
||||
@@ -120,6 +149,7 @@
|
||||
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -235,6 +265,7 @@
|
||||
@@ -247,6 +277,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerHopper.java
|
||||
+++ b/net/minecraft/server/ContainerHopper.java
|
||||
@@ -1,9 +1,30 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerHopper.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerHopper.java
|
||||
@@ -6,10 +6,31 @@
|
||||
import net.minecraft.world.entity.player.PlayerInventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
@@ -31,7 +32,7 @@
|
||||
public ContainerHopper(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, new InventorySubcontainer(5));
|
||||
}
|
||||
@@ -11,6 +32,7 @@
|
||||
@@ -17,6 +38,7 @@
|
||||
public ContainerHopper(int i, PlayerInventory playerinventory, IInventory iinventory) {
|
||||
super(Containers.HOPPER, i);
|
||||
this.hopper = iinventory;
|
||||
@@ -39,7 +40,7 @@
|
||||
a(iinventory, 5);
|
||||
iinventory.startOpen(playerinventory.player);
|
||||
boolean flag = true;
|
||||
@@ -35,6 +57,7 @@
|
||||
@@ -41,6 +63,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerHorse.java
|
||||
+++ b/net/minecraft/server/ContainerHorse.java
|
||||
@@ -1,12 +1,32 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerHorse.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerHorse.java
|
||||
@@ -9,13 +9,33 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
--- a/net/minecraft/server/ContainerLectern.java
|
||||
+++ b/net/minecraft/server/ContainerLectern.java
|
||||
@@ -1,15 +1,40 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerLectern.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerLectern.java
|
||||
@@ -5,16 +5,42 @@
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.player.PlayerInventory;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryLectern;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
@@ -44,7 +46,7 @@
|
||||
super(Containers.LECTERN, i);
|
||||
a(iinventory, 1);
|
||||
a(icontainerproperties, 1);
|
||||
@@ -23,6 +48,7 @@
|
||||
@@ -28,6 +54,7 @@
|
||||
}
|
||||
});
|
||||
this.a(icontainerproperties);
|
||||
@@ -52,7 +54,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +74,13 @@
|
||||
@@ -53,6 +80,13 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -66,7 +68,7 @@
|
||||
ItemStack itemstack = this.inventory.splitWithoutUpdate(0);
|
||||
|
||||
this.inventory.update();
|
||||
@@ -70,6 +103,7 @@
|
||||
@@ -75,6 +109,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerLoom.java
|
||||
+++ b/net/minecraft/server/ContainerLoom.java
|
||||
@@ -1,7 +1,29 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerLoom.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerLoom.java
|
||||
@@ -16,8 +16,30 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.EnumBannerPatternType;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -30,7 +31,7 @@
|
||||
private final ContainerAccess containerAccess;
|
||||
private final ContainerProperty d;
|
||||
private Runnable e;
|
||||
@@ -29,6 +51,13 @@
|
||||
@@ -45,6 +67,13 @@
|
||||
ContainerLoom.this.a((IInventory) this);
|
||||
ContainerLoom.this.e.run();
|
||||
}
|
||||
@@ -44,7 +45,7 @@
|
||||
};
|
||||
this.resultInventory = new InventorySubcontainer(1) {
|
||||
@Override
|
||||
@@ -36,6 +65,13 @@
|
||||
@@ -52,6 +81,13 @@
|
||||
super.update();
|
||||
ContainerLoom.this.e.run();
|
||||
}
|
||||
@@ -58,7 +59,7 @@
|
||||
};
|
||||
this.containerAccess = containeraccess;
|
||||
this.f = this.a(new Slot(this.craftInventory, 0, 13, 26) {
|
||||
@@ -96,10 +132,12 @@
|
||||
@@ -112,10 +148,12 @@
|
||||
}
|
||||
|
||||
this.a(this.d);
|
||||
@@ -71,7 +72,7 @@
|
||||
return a(this.containerAccess, entityhuman, Blocks.LOOM);
|
||||
}
|
||||
|
||||
@@ -218,6 +256,11 @@
|
||||
@@ -234,6 +272,11 @@
|
||||
|
||||
if (nbttagcompound.hasKeyOfType("Patterns", 9)) {
|
||||
nbttaglist = nbttagcompound.getList("Patterns", 10);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerMerchant.java
|
||||
+++ b/net/minecraft/server/ContainerMerchant.java
|
||||
@@ -1,10 +1,25 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerMerchant.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerMerchant.java
|
||||
@@ -12,11 +12,26 @@
|
||||
import net.minecraft.world.item.trading.MerchantRecipe;
|
||||
import net.minecraft.world.item.trading.MerchantRecipeList;
|
||||
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
||||
+
|
||||
@@ -26,7 +27,7 @@
|
||||
public ContainerMerchant(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, new MerchantWrapper(playerinventory.player));
|
||||
}
|
||||
@@ -16,6 +31,7 @@
|
||||
@@ -28,6 +43,7 @@
|
||||
this.a(new Slot(this.inventoryMerchant, 0, 136, 37));
|
||||
this.a(new Slot(this.inventoryMerchant, 1, 162, 37));
|
||||
this.a((Slot) (new SlotMerchantResult(playerinventory.player, imerchant, this.inventoryMerchant, 2, 220, 37)));
|
||||
@@ -34,7 +35,7 @@
|
||||
|
||||
int j;
|
||||
|
||||
@@ -96,7 +112,7 @@
|
||||
@@ -108,7 +124,7 @@
|
||||
}
|
||||
|
||||
private void k() {
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
--- a/net/minecraft/server/ContainerPlayer.java
|
||||
+++ b/net/minecraft/server/ContainerPlayer.java
|
||||
@@ -1,5 +1,10 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerPlayer.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerPlayer.java
|
||||
@@ -11,6 +11,12 @@
|
||||
import net.minecraft.world.item.crafting.IRecipe;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentManager;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.network.chat.ChatMessage;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
+// CraftBukkit end
|
||||
@@ -11,7 +13,7 @@
|
||||
public class ContainerPlayer extends ContainerRecipeBook<InventoryCrafting> {
|
||||
|
||||
public static final MinecraftKey c = new MinecraftKey("textures/atlas/blocks.png");
|
||||
@@ -10,15 +15,28 @@
|
||||
@@ -21,15 +27,28 @@
|
||||
public static final MinecraftKey h = new MinecraftKey("item/empty_armor_slot_shield");
|
||||
private static final MinecraftKey[] j = new MinecraftKey[]{ContainerPlayer.g, ContainerPlayer.f, ContainerPlayer.e, ContainerPlayer.d};
|
||||
private static final EnumItemSlot[] k = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET};
|
||||
@@ -42,7 +44,7 @@
|
||||
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 154, 28)));
|
||||
|
||||
int i;
|
||||
@@ -85,7 +103,7 @@
|
||||
@@ -96,7 +115,7 @@
|
||||
|
||||
@Override
|
||||
public void a(IInventory iinventory) {
|
||||
@@ -51,7 +53,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,4 +210,17 @@
|
||||
@@ -203,4 +222,17 @@
|
||||
public InventoryCrafting j() {
|
||||
return this.craftInventory;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerShulkerBox.java
|
||||
+++ b/net/minecraft/server/ContainerShulkerBox.java
|
||||
@@ -1,8 +1,27 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/ContainerShulkerBox.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerShulkerBox.java
|
||||
@@ -6,9 +6,28 @@
|
||||
import net.minecraft.world.entity.player.PlayerInventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||
@@ -28,7 +29,7 @@
|
||||
|
||||
public ContainerShulkerBox(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, new InventorySubcontainer(27));
|
||||
@@ -12,6 +31,7 @@
|
||||
@@ -18,6 +37,7 @@
|
||||
super(Containers.SHULKER_BOX, i);
|
||||
a(iinventory, 27);
|
||||
this.c = iinventory;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerSmithing.java
|
||||
+++ b/net/minecraft/server/ContainerSmithing.java
|
||||
@@ -3,12 +3,17 @@
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/inventory/ContainerSmithing.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerSmithing.java
|
||||
@@ -12,12 +12,17 @@
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
||||
+
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
public ContainerSmithing(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -54,13 +59,13 @@
|
||||
@@ -63,13 +68,13 @@
|
||||
List<RecipeSmithing> list = this.g.getCraftingManager().b(Recipes.SMITHING, this.repairInventory, this.g);
|
||||
|
||||
if (list.isEmpty()) {
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,4 +81,18 @@
|
||||
@@ -85,4 +90,18 @@
|
||||
public boolean a(ItemStack itemstack, Slot slot) {
|
||||
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerStonecutter.java
|
||||
+++ b/net/minecraft/server/ContainerStonecutter.java
|
||||
@@ -3,6 +3,13 @@
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.List;
|
||||
--- a/net/minecraft/world/inventory/ContainerStonecutter.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerStonecutter.java
|
||||
@@ -16,6 +16,13 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
@@ -14,7 +14,7 @@
|
||||
public class ContainerStonecutter extends Container {
|
||||
|
||||
private final ContainerAccess containerAccess;
|
||||
@@ -16,6 +23,21 @@
|
||||
@@ -29,6 +36,21 @@
|
||||
private Runnable l;
|
||||
public final IInventory inventory;
|
||||
private final InventoryCraftResult resultInventory;
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -35,6 +57,13 @@
|
||||
@@ -48,6 +70,13 @@
|
||||
ContainerStonecutter.this.a((IInventory) this);
|
||||
ContainerStonecutter.this.l.run();
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
};
|
||||
this.resultInventory = new InventoryCraftResult();
|
||||
this.containerAccess = containeraccess;
|
||||
@@ -82,10 +111,12 @@
|
||||
@@ -95,10 +124,12 @@
|
||||
}
|
||||
|
||||
this.a(this.containerProperty);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/ContainerWorkbench.java
|
||||
+++ b/net/minecraft/server/ContainerWorkbench.java
|
||||
@@ -2,12 +2,21 @@
|
||||
|
||||
import java.util.Optional;
|
||||
--- a/net/minecraft/world/inventory/ContainerWorkbench.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerWorkbench.java
|
||||
@@ -14,12 +14,21 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
public ContainerWorkbench(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -15,8 +24,12 @@
|
||||
@@ -27,8 +36,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 +55,7 @@
|
||||
@@ -54,7 +67,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if (!world.isClientSide) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) entityhuman;
|
||||
ItemStack itemstack = ItemStack.b;
|
||||
@@ -55,6 +68,7 @@
|
||||
@@ -67,6 +80,7 @@
|
||||
itemstack = recipecrafting.a(inventorycrafting);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
inventorycraftresult.setItem(0, itemstack);
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutSetSlot(i, 0, itemstack));
|
||||
@@ -64,7 +78,7 @@
|
||||
@@ -76,7 +90,7 @@
|
||||
@Override
|
||||
public void a(IInventory iinventory) {
|
||||
this.containerAccess.a((world, blockposition) -> {
|
||||
@@ -62,7 +62,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -94,6 +108,7 @@
|
||||
@@ -106,6 +120,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
@@ -70,7 +70,7 @@
|
||||
return a(this.containerAccess, entityhuman, Blocks.CRAFTING_TABLE);
|
||||
}
|
||||
|
||||
@@ -168,4 +183,17 @@
|
||||
@@ -180,4 +195,17 @@
|
||||
public int h() {
|
||||
return this.craftInventory.f();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
--- a/net/minecraft/server/Containers.java
|
||||
+++ b/net/minecraft/server/Containers.java
|
||||
@@ -19,7 +19,7 @@
|
||||
--- a/net/minecraft/world/inventory/Containers.java
|
||||
+++ b/net/minecraft/world/inventory/Containers.java
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
import net.minecraft.core.IRegistry;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.world.entity.player.PlayerInventory;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class Containers<T extends Container> {
|
||||
|
||||
public static final Containers<ContainerChest> GENERIC_9X1 = a("generic_9x1", ContainerChest::a);
|
||||
@@ -21,7 +25,7 @@
|
||||
public static final Containers<ContainerGrindstone> GRINDSTONE = a("grindstone", ContainerGrindstone::new);
|
||||
public static final Containers<ContainerHopper> HOPPER = a("hopper", ContainerHopper::new);
|
||||
public static final Containers<ContainerLectern> LECTERN = a("lectern", (i, playerinventory) -> {
|
||||
@@ -9,7 +20,7 @@
|
||||
});
|
||||
public static final Containers<ContainerLoom> LOOM = a("loom", ContainerLoom::new);
|
||||
public static final Containers<ContainerMerchant> MERCHANT = a("merchant", ContainerMerchant::new);
|
||||
@@ -31,12 +31,17 @@
|
||||
@@ -33,12 +37,17 @@
|
||||
private final Containers.Supplier<T> y;
|
||||
|
||||
private static <T extends Container> Containers<T> a(String s, Containers.Supplier<T> containers_supplier) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/InventoryCraftResult.java
|
||||
+++ b/net/minecraft/server/InventoryCraftResult.java
|
||||
@@ -3,12 +3,51 @@
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/inventory/InventoryCraftResult.java
|
||||
+++ b/net/minecraft/world/inventory/InventoryCraftResult.java
|
||||
@@ -9,12 +9,51 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.crafting.IRecipe;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
--- a/net/minecraft/server/InventoryCrafting.java
|
||||
+++ b/net/minecraft/server/InventoryCrafting.java
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
import java.util.Iterator;
|
||||
--- a/net/minecraft/world/inventory/InventoryCrafting.java
|
||||
+++ b/net/minecraft/world/inventory/InventoryCrafting.java
|
||||
@@ -8,6 +8,15 @@
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import net.minecraft.world.item.crafting.IRecipe;
|
||||
+import org.bukkit.Location;
|
||||
+
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.entity.HumanEntity;
|
||||
+import org.bukkit.event.inventory.InventoryType;
|
||||
@@ -16,7 +16,7 @@
|
||||
public class InventoryCrafting implements IInventory, AutoRecipeOutput {
|
||||
|
||||
private final NonNullList<ItemStack> items;
|
||||
@@ -9,6 +18,68 @@
|
||||
@@ -15,6 +24,68 @@
|
||||
private final int c;
|
||||
public final Container container;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
--- a/net/minecraft/server/InventoryEnderChest.java
|
||||
+++ b/net/minecraft/server/InventoryEnderChest.java
|
||||
@@ -1,11 +1,29 @@
|
||||
package net.minecraft.server;
|
||||
--- a/net/minecraft/world/inventory/InventoryEnderChest.java
|
||||
+++ b/net/minecraft/world/inventory/InventoryEnderChest.java
|
||||
@@ -7,12 +7,30 @@
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.entity.TileEntityEnderChest;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.Location;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
--- a/net/minecraft/server/InventoryMerchant.java
|
||||
+++ b/net/minecraft/server/InventoryMerchant.java
|
||||
@@ -3,6 +3,14 @@
|
||||
import java.util.Iterator;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/inventory/InventoryMerchant.java
|
||||
+++ b/net/minecraft/world/inventory/InventoryMerchant.java
|
||||
@@ -11,6 +11,16 @@
|
||||
import net.minecraft.world.item.trading.MerchantRecipe;
|
||||
import net.minecraft.world.item.trading.MerchantRecipeList;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
+import net.minecraft.world.entity.npc.EntityVillager;
|
||||
+import net.minecraft.world.entity.npc.EntityVillagerAbstract;
|
||||
+import org.bukkit.Location;
|
||||
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||
+import org.bukkit.craftbukkit.entity.CraftAbstractVillager;
|
||||
@@ -15,7 +17,7 @@
|
||||
public class InventoryMerchant implements IInventory {
|
||||
|
||||
private final IMerchant merchant;
|
||||
@@ -12,6 +20,46 @@
|
||||
@@ -20,6 +30,46 @@
|
||||
public int selectedIndex;
|
||||
private int e;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/SlotFurnaceResult.java
|
||||
+++ b/net/minecraft/server/SlotFurnaceResult.java
|
||||
@@ -41,7 +41,7 @@
|
||||
--- a/net/minecraft/world/inventory/SlotFurnaceResult.java
|
||||
+++ b/net/minecraft/world/inventory/SlotFurnaceResult.java
|
||||
@@ -46,7 +46,7 @@
|
||||
protected void c(ItemStack itemstack) {
|
||||
itemstack.a(this.a.world, this.a, this.b);
|
||||
if (!this.a.world.isClientSide && this.inventory instanceof TileEntityFurnace) {
|
||||
|
||||
Reference in New Issue
Block a user