From 4d44f0da49a8676fe557ba5da9022428a6b6f061 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Sat, 21 Dec 2013 12:58:12 +0200 Subject: Added new messages, added the timers to the config file, changed the config file a bit, fixed the molds not dropping correctly --- common/darkknight/jewelrycraft/block/BlockSmelter.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'common/darkknight/jewelrycraft/block/BlockSmelter.java') diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java index f58812b..2f90b34 100644 --- a/common/darkknight/jewelrycraft/block/BlockSmelter.java +++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java @@ -14,6 +14,7 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.StatCollector; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import darkknight.jewelrycraft.config.ConfigHandler; import darkknight.jewelrycraft.tileentity.TileEntityMolder; import darkknight.jewelrycraft.tileentity.TileEntitySmelter; @@ -64,10 +65,11 @@ public class BlockSmelter extends BlockContainer if (!te.hasMetal && !te.hasMoltenMetal && item != null && item.getUnlocalizedName().toLowerCase().contains("ingot") && !item.getDisplayName().contains("Mold")) { entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.nowsmeltingingot", item.getDisplayName())); - te.metal = new ItemStack(item.itemID, 1, item.getItemDamage()); + te.metal = item.copy(); + te.metal.stackSize = 1; te.hasMetal = true; - te.melting = 1500; - --item.stackSize; + te.melting = ConfigHandler.ingotSmeltingTime; + if (!entityPlayer.capabilities.isCreativeMode) --item.stackSize; } else if (te.hasMetal && !te.hasMoltenMetal && item != null && item.getDisplayName().contains("Ingot") && !item.getDisplayName().contains("Mold")) entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.alreadyhasingot", te.metal.getDisplayName())); @@ -109,7 +111,7 @@ public class BlockSmelter extends BlockContainer { me.moltenMetal = te.moltenMetal; me.hasMoltenMetal = true; - me.cooling = 200; + me.cooling = ConfigHandler.ingotCoolingTime; te.moltenMetal = new ItemStack(0, 0, 0); te.hasMoltenMetal = false; me.isDirty = true; -- cgit v1.2.3