Setup translation keys for mode setting & modes for tools

This commit is contained in:
Robert S 2014-05-05 17:16:54 -04:00
parent 8ca3070735
commit d0ead155d3

View file

@ -64,9 +64,11 @@ public class ItemTool extends Item
if (player.isSneaking())
{
setMode(itemStack, (getMode(itemStack) + 1) % toolModes.length);
if (!world.isRemote)
player.addChatMessage("Set tool mode to: " + toolModes[getMode(itemStack)]);
String modeKey = toolModes[getMode(itemStack)];
if (!world.isRemote && modeKey != null && !modeKey.isEmpty())
{
player.addChatMessage(LanguageUtility.getLocal("tool.mode.set") + LanguageUtility.getLocal(modeKey));
}
}
}