summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/block/BlockSmelter.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 12:58:12 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-21 12:58:12 +0200
commit4d44f0da49a8676fe557ba5da9022428a6b6f061 (patch)
tree7ef3a610ef60fcb5b63ac72962da6af27b8005ed /common/darkknight/jewelrycraft/block/BlockSmelter.java
parent401d313409ca088156f5e7658cdb744a9d2d2cb7 (diff)
Added new messages, added the timers to the config file, changed the config file a bit, fixed the molds not dropping correctly
Diffstat (limited to 'common/darkknight/jewelrycraft/block/BlockSmelter.java')
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java10
1 files changed, 6 insertions, 4 deletions
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;