summaryrefslogtreecommitdiff
path: root/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-15 22:41:43 +0300
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-15 22:41:43 +0300
commit4b8b13b34d7a8fd0ee7c7b13f11be9c2bf3b5d18 (patch)
treeb49bc483d576ec3abeb2e18523e4511ecce353d3 /eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java
parent86398ed60db321f86e8d98f191107fdac2c93760 (diff)
More 1.7 stuff
Diffstat (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java')
-rw-r--r--eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java
index 95c2697..176a6f2 100644
--- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -57,7 +57,7 @@ public class BlockSmelter extends BlockContainer
TileEntitySmelter te = (TileEntitySmelter) world.getTileEntity(i, j, k);
if (te != null && te.hasMetal){
dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal.copy());
- world.markBlockForUpdate(i, j, k);
+ world.removeTileEntity(i, j, k);
}
super.breakBlock(world, i, j, k, par5, par6);
}
@@ -80,6 +80,7 @@ public class BlockSmelter extends BlockContainer
te.melting = ConfigHandler.ingotMeltingTime;
if (!entityPlayer.capabilities.isCreativeMode) --item.stackSize;
te.isDirty = true;
+ te.markDirty();
}
else if (te.hasMetal && !te.hasMoltenMetal && item != null && item.getDisplayName().contains("Ingot") && !item.getDisplayName().contains("Mold"))
entityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocalFormatted("chatmessage.Jewelrycraft.smelter.alreadyhasingot", te.metal.getDisplayName())));
@@ -95,6 +96,8 @@ public class BlockSmelter extends BlockContainer
dropItem(world, (double)te.xCoord, (double)te.yCoord, (double)te.zCoord, te.metal.copy());
te.hasMetal = false;
te.melting = -1;
+ te.isDirty = true;
+ te.markDirty();
world.markBlockForUpdate(i, j, k);
world.setTileEntity(i, j, k, te);
}
@@ -126,7 +129,8 @@ public class BlockSmelter extends BlockContainer
me.cooling = ConfigHandler.ingotCoolingTime;
te.moltenMetal = new ItemStack(Item.getItemById(0), 0, 0);
te.hasMoltenMetal = false;
- me.isDirty = true;
+ te.isDirty = true;
+ te.markDirty();
world.markBlockForUpdate(i, j, k);
world.setTileEntity(i, j, k, te);
}
@@ -185,7 +189,7 @@ public class BlockSmelter extends BlockContainer
return -1;
}
- public void registerIcons(IIconRegister icon)
+ public void registerBlockIcons(IIconRegister icon)
{
this.blockIcon = icon.registerIcon("jewelrycraft:smelter");
}