diff options
author | Dinnerbone (Laptop) <dinnerbone@dinnerbone.com> | 2012-03-30 23:33:51 +0200 |
---|---|---|
committer | Dinnerbone (Laptop) <dinnerbone@dinnerbone.com> | 2012-03-30 23:33:51 +0200 |
commit | 1fa4d8430e4174d0f8eb5d50667d0247f7877679 (patch) | |
tree | a806cee32737d36dbb27576c564d3099f336fbe7 /src/main/java/net/minecraft/server/TileEntityFurnace.java | |
parent | e0c01154b030c527815e884b6b331c5534ab247f (diff) | |
download | craftbukkit-1fa4d8430e4174d0f8eb5d50667d0247f7877679.tar craftbukkit-1fa4d8430e4174d0f8eb5d50667d0247f7877679.tar.gz craftbukkit-1fa4d8430e4174d0f8eb5d50667d0247f7877679.tar.lz craftbukkit-1fa4d8430e4174d0f8eb5d50667d0247f7877679.tar.xz craftbukkit-1fa4d8430e4174d0f8eb5d50667d0247f7877679.zip |
Updated version to 1.2.5-R0.1-SNAPSHOT
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityFurnace.java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityFurnace.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java index 48635c82..d282cc13 100644 --- a/src/main/java/net/minecraft/server/TileEntityFurnace.java +++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java @@ -6,11 +6,9 @@ import java.util.List; import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.entity.HumanEntity; -import org.bukkit.entity.Player; import org.bukkit.event.inventory.FurnaceBurnEvent; import org.bukkit.event.inventory.FurnaceSmeltEvent; import org.bukkit.craftbukkit.entity.CraftHumanEntity; -import org.bukkit.craftbukkit.entity.CraftPlayer; // CraftBukkit end public class TileEntityFurnace extends TileEntity implements IInventory { @@ -116,7 +114,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory { this.burnTime = nbttagcompound.getShort("BurnTime"); this.cookTime = nbttagcompound.getShort("CookTime"); - this.ticksForCurrentFuel = this.fuelTime(this.items[1]); + this.ticksForCurrentFuel = fuelTime(this.items[1]); } public void b(NBTTagCompound nbttagcompound) { @@ -177,7 +175,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory { if (this.burnTime <= 0 && this.canBurn() && this.items[1] != null) { // CraftBukkit - == to <= CraftItemStack fuel = new CraftItemStack(this.items[1]); - FurnaceBurnEvent furnaceBurnEvent = new FurnaceBurnEvent(this.world.getWorld().getBlockAt(this.x, this.y, this.z), fuel, this.fuelTime(this.items[1])); + FurnaceBurnEvent furnaceBurnEvent = new FurnaceBurnEvent(this.world.getWorld().getBlockAt(this.x, this.y, this.z), fuel, fuelTime(this.items[1])); this.world.getServer().getPluginManager().callEvent(furnaceBurnEvent); if (furnaceBurnEvent.isCancelled()) { @@ -267,7 +265,7 @@ public class TileEntityFurnace extends TileEntity implements IInventory { } } - private int fuelTime(ItemStack itemstack) { + public static int fuelTime(ItemStack itemstack) { if (itemstack == null) { return 0; } else { @@ -277,6 +275,10 @@ public class TileEntityFurnace extends TileEntity implements IInventory { } } + public static boolean isFuel(ItemStack itemstack) { + return fuelTime(itemstack) > 0; + } + public boolean a(EntityHuman entityhuman) { 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; } |