@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
+++ b/net/minecraft/world/inventory/ContainerFurnace.java
|
||||
@@ -14,6 +14,11 @@
|
||||
@@ -12,6 +12,11 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.block.entity.TileEntityFurnace;
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
+
|
||||
public abstract class ContainerFurnace extends ContainerRecipeBook<IInventory> {
|
||||
|
||||
private final IInventory furnace;
|
||||
@@ -22,6 +27,22 @@
|
||||
private final Recipes<? extends RecipeCooking> f;
|
||||
private final RecipeBookType g;
|
||||
public static final int INGREDIENT_SLOT = 0;
|
||||
@@ -29,6 +34,22 @@
|
||||
private final Recipes<? extends RecipeCooking> recipeType;
|
||||
private final RecipeBookType recipeBookType;
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ private CraftInventoryView bukkitEntity = null;
|
||||
@@ -26,7 +26,7 @@
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
+
|
||||
+ CraftInventoryFurnace inventory = new CraftInventoryFurnace((TileEntityFurnace) this.furnace);
|
||||
+ CraftInventoryFurnace inventory = new CraftInventoryFurnace((TileEntityFurnace) this.container);
|
||||
+ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
|
||||
+ return bukkitEntity;
|
||||
+ }
|
||||
@@ -35,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));
|
||||
}
|
||||
@@ -38,6 +59,7 @@
|
||||
@@ -45,6 +66,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)));
|
||||
@@ -43,29 +43,20 @@
|
||||
|
||||
int j;
|
||||
|
||||
@@ -69,7 +91,7 @@
|
||||
|
||||
@Override
|
||||
public void a(boolean flag, IRecipe<?> irecipe, EntityPlayer entityplayer) {
|
||||
- (new AutoRecipeFurnace<>(this)).a(entityplayer, irecipe, flag);
|
||||
+ (new AutoRecipeFurnace(this)).a(entityplayer, irecipe, flag); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,6 +116,7 @@
|
||||
@@ -102,6 +124,7 @@
|
||||
|
||||
@Override
|
||||
public boolean canUse(EntityHuman entityhuman) {
|
||||
+ if (!this.checkReachable) return true; // CraftBukkit
|
||||
return this.furnace.a(entityhuman);
|
||||
return this.container.a(entityhuman);
|
||||
}
|
||||
|
||||
@@ -149,7 +172,7 @@
|
||||
@@ -157,7 +180,7 @@
|
||||
}
|
||||
|
||||
protected boolean a(ItemStack itemstack) {
|
||||
- return this.c.getCraftingManager().craft(this.f, new InventorySubcontainer(new ItemStack[]{itemstack}), this.c).isPresent();
|
||||
+ return this.c.getCraftingManager().craft((Recipes<RecipeCooking>) this.f, new InventorySubcontainer(new ItemStack[]{itemstack}), this.c).isPresent(); // Eclipse fail
|
||||
protected boolean c(ItemStack itemstack) {
|
||||
- return this.level.getCraftingManager().craft(this.recipeType, new InventorySubcontainer(new ItemStack[]{itemstack}), this.level).isPresent();
|
||||
+ return this.level.getCraftingManager().craft((Recipes<RecipeCooking>) this.recipeType, new InventorySubcontainer(new ItemStack[]{itemstack}), this.level).isPresent(); // Eclipse fail
|
||||
}
|
||||
|
||||
protected boolean b(ItemStack itemstack) {
|
||||
protected boolean d(ItemStack itemstack) {
|
||||
|
||||
Reference in New Issue
Block a user