Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -1,19 +1,19 @@
--- a/net/minecraft/server/ContainerFurnace.java
+++ b/net/minecraft/server/ContainerFurnace.java
@@ -1,6 +1,10 @@
@@ -1,5 +1,10 @@
package net.minecraft.server;
import java.util.Iterator;
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
+// CraftBukkit end
+
public abstract class ContainerFurnace extends ContainerRecipeBook<IInventory> {
public class ContainerFurnace extends ContainerRecipeBook {
@@ -11,12 +15,29 @@
private int i;
private int j;
private final IInventory furnace;
@@ -7,6 +12,22 @@
protected final World c;
private final Recipes<? extends RecipeCooking> f;
+ // CraftBukkit start
+ private CraftInventoryView bukkitEntity = null;
@@ -31,21 +31,40 @@
+ }
+ // CraftBukkit end
+
public ContainerFurnace(PlayerInventory playerinventory, IInventory iinventory) {
this.furnace = iinventory;
this.f = playerinventory.player.world;
protected ContainerFurnace(Containers<?> containers, Recipes<? extends RecipeCooking> recipes, int i, PlayerInventory playerinventory) {
this(containers, recipes, i, playerinventory, new InventorySubcontainer(3), new ContainerProperties(4));
}
@@ -22,6 +43,7 @@
this.a(new Slot(iinventory, 0, 56, 17));
this.a((Slot) (new SlotFurnaceFuel(iinventory, 1, 56, 53)));
this.a((Slot) (new SlotFurnaceFuel(this, iinventory, 1, 56, 53)));
this.a((Slot) (new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35)));
+ this.player = playerinventory; // CraftBukkit - save player
int i;
int j;
@@ -95,6 +116,7 @@
@@ -53,7 +75,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
@@ -78,6 +100,7 @@
@Override
public boolean canUse(EntityHuman entityhuman) {
+ if (!this.checkReachable) return true; // CraftBukkit
return this.furnace.a(entityhuman);
}
@@ -133,7 +156,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 b(ItemStack itemstack) {