Nag messages can now be translated. Closes #101
This commit is contained in:
parent
83f248e36f
commit
257b82dff6
|
@ -3,10 +3,13 @@ package biomesoplenty.handlers;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import biomesoplenty.helpers.Version;
|
import biomesoplenty.helpers.Version;
|
||||||
import cpw.mods.fml.common.ITickHandler;
|
import cpw.mods.fml.common.ITickHandler;
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.TickType;
|
import cpw.mods.fml.common.TickType;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
public class TickHandlerClient implements ITickHandler
|
public class TickHandlerClient implements ITickHandler
|
||||||
{
|
{
|
||||||
|
@ -27,12 +30,18 @@ public class TickHandlerClient implements ITickHandler
|
||||||
|
|
||||||
if (Version.needsBOPWorldtypeAndMarkAsSeen(player.worldObj))
|
if (Version.needsBOPWorldtypeAndMarkAsSeen(player.worldObj))
|
||||||
{
|
{
|
||||||
player.addChatMessage(String.format("\u00A7cThe Biomes O Plenty world type must be used in order for the new biomes to generate. This message will only display once."));
|
ChatMessageComponent updateMessage = new ChatMessageComponent();
|
||||||
|
updateMessage.setColor(EnumChatFormatting.RED);
|
||||||
|
updateMessage.addKey("phrase.bop.useBOPWorldtype");
|
||||||
|
player.sendChatToPlayer(updateMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Version.needsUpdateNoticeAndMarkAsSeen())
|
if (Version.needsUpdateNoticeAndMarkAsSeen())
|
||||||
{
|
{
|
||||||
player.addChatMessage(String.format("\u00A7cA new version of Biomes O Plenty is available: v%s for Minecraft %s", Version.getRecommendedVersion(), Loader.instance().getMinecraftModContainer().getVersion()));
|
ChatMessageComponent updateMessage = new ChatMessageComponent();
|
||||||
|
updateMessage.setColor(EnumChatFormatting.RED);
|
||||||
|
updateMessage.addFormatted("phrase.bop.updateAvaliable", Version.getRecommendedVersion(), Loader.instance().getMinecraftModContainer().getVersion());
|
||||||
|
player.sendChatToPlayer(updateMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
nagged = true;
|
nagged = true;
|
||||||
|
|
|
@ -379,6 +379,9 @@ fluid.bop.springWater=Spring Water
|
||||||
phrase.bop.promisedPortalOverworld=A gateway to the Promised Land has appeared in the sky above.
|
phrase.bop.promisedPortalOverworld=A gateway to the Promised Land has appeared in the sky above.
|
||||||
phrase.bop.promisedPortalOther=A gateway to the Overworld has appeared in the sky above.
|
phrase.bop.promisedPortalOther=A gateway to the Overworld has appeared in the sky above.
|
||||||
|
|
||||||
|
phrase.bop.useBOPWorldtype=The Biomes O Plenty world type must be used in order for the new biomes to generate. This message will only display once.
|
||||||
|
phrase.bop.updateAvaliable=A new version of Biomes O Plenty is available: v%s for Minecraft %s
|
||||||
|
|
||||||
entity.BiomesOPlenty.Glob.name=Glob
|
entity.BiomesOPlenty.Glob.name=Glob
|
||||||
entity.BiomesOPlenty.JungleSpider.name=Jungle Spider
|
entity.BiomesOPlenty.JungleSpider.name=Jungle Spider
|
||||||
entity.BiomesOPlenty.Phantom.name=Phantom
|
entity.BiomesOPlenty.Phantom.name=Phantom
|
||||||
|
|
Loading…
Reference in New Issue