@@ -162,8 +162,8 @@
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
} else {
|
||||
Slot slot2;
|
||||
@@ -605,13 +698,14 @@
|
||||
int j2;
|
||||
@@ -609,13 +702,14 @@
|
||||
ItemStack itemstack = this.getCarried();
|
||||
|
||||
if (!itemstack.isEmpty()) {
|
||||
@@ -179,7 +179,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -828,6 +922,11 @@
|
||||
@@ -832,6 +926,11 @@
|
||||
}
|
||||
|
||||
public ItemStack getCarried() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerBrewingStand.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerBrewingStand.java
|
||||
@@ -12,6 +12,11 @@
|
||||
@@ -13,6 +13,11 @@
|
||||
import net.minecraft.world.item.alchemy.PotionRegistry;
|
||||
import net.minecraft.world.item.alchemy.PotionUtil;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
public class ContainerBrewingStand extends Container {
|
||||
|
||||
private static final int BOTTLE_SLOT_START = 0;
|
||||
@@ -28,12 +33,18 @@
|
||||
@@ -29,12 +34,18 @@
|
||||
private final IContainerProperties brewingStandData;
|
||||
private final Slot ingredientSlot;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
checkContainerSize(iinventory, 5);
|
||||
checkContainerDataCount(icontainerproperties, 2);
|
||||
this.brewingStand = iinventory;
|
||||
@@ -61,6 +72,7 @@
|
||||
@@ -62,6 +73,7 @@
|
||||
|
||||
@Override
|
||||
public boolean stillValid(EntityHuman entityhuman) {
|
||||
@@ -39,7 +39,7 @@
|
||||
return this.brewingStand.stillValid(entityhuman);
|
||||
}
|
||||
|
||||
@@ -198,4 +210,17 @@
|
||||
@@ -199,4 +211,17 @@
|
||||
return 64;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
public class Containers<T extends Container> implements FeatureElement {
|
||||
|
||||
public static final Containers<ContainerChest> GENERIC_9x1 = register("generic_9x1", ContainerChest::oneRow);
|
||||
@@ -27,7 +31,7 @@
|
||||
@@ -28,7 +32,7 @@
|
||||
public static final Containers<ContainerGrindstone> GRINDSTONE = register("grindstone", ContainerGrindstone::new);
|
||||
public static final Containers<ContainerHopper> HOPPER = register("hopper", ContainerHopper::new);
|
||||
public static final Containers<ContainerLectern> LECTERN = register("lectern", (i, playerinventory) -> {
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/net/minecraft/world/inventory/CrafterMenu.java
|
||||
+++ b/net/minecraft/world/inventory/CrafterMenu.java
|
||||
@@ -8,8 +8,27 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.CrafterBlock;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafter;
|
||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class CrafterMenu extends Container implements ICrafting {
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ private CraftInventoryView bukkitEntity = null;
|
||||
+
|
||||
+ @Override
|
||||
+ public CraftInventoryView getBukkitView() {
|
||||
+ if (bukkitEntity != null) {
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+
|
||||
+ CraftInventoryCrafter inventory = new CraftInventoryCrafter(this.container, this.resultContainer);
|
||||
+ bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
protected static final int SLOT_COUNT = 9;
|
||||
private static final int INV_SLOT_START = 9;
|
||||
private static final int INV_SLOT_END = 36;
|
||||
@@ -116,6 +135,7 @@
|
||||
|
||||
@Override
|
||||
public boolean stillValid(EntityHuman entityhuman) {
|
||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||
return this.container.stillValid(entityhuman);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user