summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbspkrs <bspkrs@gmail.com>2013-12-16 14:53:55 -0500
committerbspkrs <bspkrs@gmail.com>2013-12-16 14:53:55 -0500
commit86084ff97061be16b8ee3e9fe8d8c79865610398 (patch)
tree497cf238e7332ff98d4144cf3410ca1872a74428
parentf15bc9e0abff4710d9860bd970b3b6820c5e78c6 (diff)
moved chat messages to lang file
-rw-r--r--common/darkknight/jewelrycraft/block/BlockSmelter.java15
-rw-r--r--resources/assets/jewelrycraft/lang/en_US.lang7
2 files changed, 15 insertions, 7 deletions
diff --git a/common/darkknight/jewelrycraft/block/BlockSmelter.java b/common/darkknight/jewelrycraft/block/BlockSmelter.java
index d78e85a..12f4611 100644
--- a/common/darkknight/jewelrycraft/block/BlockSmelter.java
+++ b/common/darkknight/jewelrycraft/block/BlockSmelter.java
@@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.StatCollector;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@@ -87,11 +88,11 @@ public class BlockSmelter extends BlockContainer
--item.stackSize;
}
else if (te.hasMetal && !te.hasMoltenMetal && item != null && item.getDisplayName().contains("Ingot") && !item.getDisplayName().contains("Mold"))
- entityPlayer.addChatMessage("The Smelter already contains a " + te.metal.getDisplayName());
+ entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.alreadyhasingot", te.metal.getDisplayName()));
else if (te.hasMoltenMetal)
- entityPlayer.addChatMessage("The Smelter contains molten " + te.moltenMetal.getDisplayName().toLowerCase().replace("ingot", ""));
+ entityPlayer.addChatMessage(StatCollector.translateToLocalFormatted("chatmessage.jewelrycraft.smelter.hasmolteningot", te.moltenMetal.getDisplayName()));
else if (item != null && !item.getDisplayName().contains("Ingot"))
- entityPlayer.addChatMessage("The item needs to be an ingot!");
+ entityPlayer.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.itemneedstobeingot"));
if (te.hasMetal && entityPlayer.isSneaking())
{
@@ -128,13 +129,13 @@ public class BlockSmelter extends BlockContainer
te.hasMoltenMetal = false;
}
else if (me.hasMoltenMetal)
- player.addChatMessage("The Molder already has molten metal in it!");
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderhasmoltenmetal"));
else if (!me.hasMold)
- player.addChatMessage("The Molder doesn't have a mold in it! You might as well pour this stuff on the ground, won't you?");
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderhasnomold"));
else if (me.hasJewelBase)
- player.addChatMessage("The Molder contains an item in it. Now you wouldn't want it to be destroyed, would you?");
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.modlerhasitem"));
else
- player.addChatMessage("You need a Molder in front of this block in order to pour the molten metal!");
+ player.addChatMessage(StatCollector.translateToLocal("chatmessage.jewelrycraft.smelter.molderismissing"));
}
}
diff --git a/resources/assets/jewelrycraft/lang/en_US.lang b/resources/assets/jewelrycraft/lang/en_US.lang
index ee226ee..d3918b4 100644
--- a/resources/assets/jewelrycraft/lang/en_US.lang
+++ b/resources/assets/jewelrycraft/lang/en_US.lang
@@ -9,3 +9,10 @@ tile.jewelrycraft.smelter.name=Smelter
tile.jewelrycraft.molder.name=Molder
tile.jewelrycraft.jewelCraftingTable.name=Jeweler's Crafting Table
itemGroup.JewelryCraft=Jewelrycraft
+chatmessage.jewelrycraft.smelter.alreadyhasingot=The Smelter already contains a %s
+chatmessage.jewelrycraft.smelter.hasmolteningot=The Smelter contains a molten %s
+chatmessage.jewelrycraft.smelter.itemneedstobeingot=The item needs to be an ingot!
+chatmessage.jewelrycraft.smelter.molderhasmoltenmetal=The Molder already has molten metal in it!
+chatmessage.jewelrycraft.smelter.molderhasnomold=The Molder doesn't have a mold in it! You might as well pour this stuff on the ground, eh?
+chatmessage.jewelrycraft.smelter.modlerhasitem=The Molder contains an item in it. Now you wouldn't want it to be destroyed, would you?
+chatmessage.jewelrycraft.smelter.molderismissing=You need a Molder in front of this block in order to pour the molten metal! \ No newline at end of file