SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -48,15 +48,6 @@
|
||||
public TileEntityFurnace() {
|
||||
super(TileEntityTypes.FURNACE);
|
||||
this.items = NonNullList.a(3, ItemStack.a);
|
||||
@@ -219,7 +253,7 @@
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
- boolean flag = this.isBurning();
|
||||
+ boolean flag = this.getBlock().get(BlockFurnace.LIT); // CraftBukkit - SPIGOT-844 - Check if furnace block is lit using the block instead of burn time
|
||||
boolean flag1 = false;
|
||||
|
||||
if (this.isBurning()) {
|
||||
@@ -237,9 +271,20 @@
|
||||
IRecipe irecipe = this.world.getCraftingManager().b(this, this.world);
|
||||
|
||||
@@ -80,15 +71,7 @@
|
||||
flag1 = true;
|
||||
if (!itemstack.isEmpty()) {
|
||||
Item item = itemstack.getItem();
|
||||
@@ -270,6 +315,7 @@
|
||||
if (flag != this.isBurning()) {
|
||||
flag1 = true;
|
||||
this.world.setTypeAndData(this.position, (IBlockData) this.world.getType(this.position).set(BlockFurnace.LIT, this.isBurning()), 3);
|
||||
+ this.invalidateBlockCache(); // CraftBukkit - Invalidate tile entity's cached block type
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +326,7 @@
|
||||
@@ -280,7 +325,7 @@
|
||||
}
|
||||
|
||||
private int s() {
|
||||
@@ -97,7 +80,7 @@
|
||||
|
||||
return furnacerecipe != null ? furnacerecipe.h() : 200;
|
||||
}
|
||||
@@ -307,11 +353,38 @@
|
||||
@@ -307,11 +352,38 @@
|
||||
ItemStack itemstack1 = irecipe.d();
|
||||
ItemStack itemstack2 = (ItemStack) this.items.get(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user