mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Update CraftBukkit to Minecraft 1.3.1
This commit is contained in:
committed by
Travis Watkins
parent
08e2923bd4
commit
a43d621c01
@@ -143,7 +143,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
return this.burnTime > 0;
|
||||
}
|
||||
|
||||
public void q_() {
|
||||
public void g() {
|
||||
boolean flag = this.burnTime > 0;
|
||||
boolean flag1 = false;
|
||||
|
||||
@@ -189,7 +189,9 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
if (this.items[1] != null) {
|
||||
--this.items[1].count;
|
||||
if (this.items[1].count == 0) {
|
||||
this.items[1] = null;
|
||||
Item item = this.items[1].getItem().q();
|
||||
|
||||
this.items[1] = item != null ? new ItemStack(item) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,7 +225,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
if (this.items[0] == null) {
|
||||
return false;
|
||||
} else {
|
||||
ItemStack itemstack = FurnaceRecipes.getInstance().getResult(this.items[0].getItem().id);
|
||||
ItemStack itemstack = RecipesFurnace.getInstance().getResult(this.items[0].getItem().id);
|
||||
|
||||
// CraftBukkit - consider resultant count instead of current count
|
||||
return itemstack == null ? false : (this.items[2] == null ? true : (!this.items[2].doMaterialsMatch(itemstack) ? false : (this.items[2].count + itemstack.count <= this.getMaxStackSize() && this.items[2].count < this.items[2].getMaxStackSize() ? true : this.items[2].count + itemstack.count <= itemstack.getMaxStackSize())));
|
||||
@@ -232,7 +234,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
|
||||
public void burn() {
|
||||
if (this.canBurn()) {
|
||||
ItemStack itemstack = FurnaceRecipes.getInstance().getResult(this.items[0].getItem().id);
|
||||
ItemStack itemstack = RecipesFurnace.getInstance().getResult(this.items[0].getItem().id);
|
||||
|
||||
// CraftBukkit start
|
||||
CraftItemStack source = new CraftItemStack(this.items[0]);
|
||||
@@ -269,8 +271,21 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
return 0;
|
||||
} else {
|
||||
int i = itemstack.getItem().id;
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
return i < 256 && Block.byId[i].material == Material.WOOD ? 300 : (i == Item.STICK.id ? 100 : (i == Item.COAL.id ? 1600 : (i == Item.LAVA_BUCKET.id ? 20000 : (i == Block.SAPLING.id ? 100 : (i == Item.BLAZE_ROD.id ? 2400 : 0)))));
|
||||
if (i < 256 && Block.byId[i] != null) {
|
||||
Block block = Block.byId[i];
|
||||
|
||||
if (block == Block.WOOD_STEP) {
|
||||
return 150;
|
||||
}
|
||||
|
||||
if (block.material == Material.WOOD) {
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
||||
return item instanceof ItemTool && ((ItemTool) item).e().equals("WOOD") ? 200 : (item instanceof ItemSword && ((ItemSword) item).f().equals("WOOD") ? 200 : (item instanceof ItemHoe && ((ItemHoe) item).f().equals("WOOD") ? 200 : (i == Item.STICK.id ? 100 : (i == Item.COAL.id ? 1600 : (i == Item.LAVA_BUCKET.id ? 20000 : (i == Block.SAPLING.id ? 100 : (i == Item.BLAZE_ROD.id ? 2400 : 0)))))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +297,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
|
||||
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.e((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
|
||||
}
|
||||
|
||||
public void f() {}
|
||||
public void startOpen() {}
|
||||
|
||||
public void g() {}
|
||||
public void f() {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user