Added localisation support for a few things. Closes #254
This commit is contained in:
parent
bf9b5bf4f7
commit
57b0baafaa
|
@ -166,13 +166,12 @@ public class ItemBOPBucket extends ItemFluidContainer
|
||||||
public String getItemStackDisplayName(ItemStack itemStack)
|
public String getItemStackDisplayName(ItemStack itemStack)
|
||||||
{
|
{
|
||||||
FluidStack fluid = this.getFluid(itemStack);
|
FluidStack fluid = this.getFluid(itemStack);
|
||||||
String bucketLocalized = StatCollector.translateToLocal(Items.bucket.getUnlocalizedName() + ".name");
|
|
||||||
|
|
||||||
if (fluid != null && fluid.amount != 0)
|
if (fluid != null && fluid.amount != 0)
|
||||||
{
|
{
|
||||||
return fluid.getFluid().getLocalizedName() + " " + bucketLocalized;
|
return StatCollector.translateToLocal(fluid.getFluid().getUnlocalizedName().replace("fluid.", "item.") + "Bucket" + ".name");
|
||||||
}
|
}
|
||||||
|
|
||||||
return bucketLocalized;
|
return Items.bucket.getUnlocalizedName() + ".name";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.ChunkPosition;
|
import net.minecraft.world.ChunkPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraft.world.biome.WorldChunkManager;
|
import net.minecraft.world.biome.WorldChunkManager;
|
||||||
import biomesoplenty.BiomesOPlenty;
|
import biomesoplenty.BiomesOPlenty;
|
||||||
import biomesoplenty.common.network.packet.PacketBiomePosition;
|
import biomesoplenty.common.network.packet.PacketBiomePosition;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@ -185,14 +187,14 @@ public class ItemBiomeFinder extends Item
|
||||||
|
|
||||||
if (biome != null)
|
if (biome != null)
|
||||||
{
|
{
|
||||||
infoList.add("" + EnumChatFormatting.BOLD + "Target: " + EnumChatFormatting.RESET + biome.biomeName);
|
infoList.add("" + EnumChatFormatting.BOLD + StatCollector.translateToLocal("biomeRadar.target") + " " + EnumChatFormatting.RESET + biome.biomeName);
|
||||||
|
|
||||||
if (itemStack.getTagCompound().hasKey("foundBiome"))
|
if (itemStack.getTagCompound().hasKey("foundBiome"))
|
||||||
{
|
{
|
||||||
boolean foundBiome = itemStack.getTagCompound().getBoolean("foundBiome");
|
boolean foundBiome = itemStack.getTagCompound().getBoolean("foundBiome");
|
||||||
|
|
||||||
if (foundBiome) infoList.add("" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.ITALIC + "Found biome!");
|
if (foundBiome) infoList.add("" + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.ITALIC + StatCollector.translateToLocal("biomeRadar.foundBiome"));
|
||||||
else infoList.add("" + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.ITALIC + "Right click to scan for biome");
|
else infoList.add("" + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.ITALIC + StatCollector.translateToLocal("biomeRadar.scanBiome"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import biomesoplenty.BiomesOPlenty;
|
import biomesoplenty.BiomesOPlenty;
|
||||||
|
|
||||||
|
@ -48,9 +50,10 @@ public class ItemEnderporter extends Item
|
||||||
{
|
{
|
||||||
if (!player.worldObj.isRemote)
|
if (!player.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
//TODO: addChatMessage()?
|
ChatComponentText chatComponent = new ChatComponentText("\u00a75" + StatCollector.translateToLocal("enderporter.prevent"));
|
||||||
//TODO: BUG Whole text isn't purple
|
|
||||||
player.addChatComponentMessage(new ChatComponentText("\u00a75A mystical energy is preventing you from using this in the current world."));
|
chatComponent.getChatStyle().setColor(EnumChatFormatting.DARK_PURPLE);
|
||||||
|
player.addChatMessage(chatComponent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -388,6 +388,9 @@ item.biomeBook.name=Book O' Biomes
|
||||||
item.biomeFinder.name=Biome Radar
|
item.biomeFinder.name=Biome Radar
|
||||||
item.biomeEssence.name=Biome Essence
|
item.biomeEssence.name=Biome Essence
|
||||||
|
|
||||||
|
item.poisonBucket.name=Poison Bucket
|
||||||
|
item.honeyBucket.name=Honey Bucket
|
||||||
|
|
||||||
tile.poison.name=Poison
|
tile.poison.name=Poison
|
||||||
tile.springWater.name=Spring Water
|
tile.springWater.name=Spring Water
|
||||||
tile.honey.name=Honey
|
tile.honey.name=Honey
|
||||||
|
@ -396,6 +399,12 @@ fluid.poison=Poison
|
||||||
fluid.springWater=Spring Water
|
fluid.springWater=Spring Water
|
||||||
fluid.honey=Honey
|
fluid.honey=Honey
|
||||||
|
|
||||||
|
biomeRadar.target=Target:
|
||||||
|
biomeRadar.foundBiome=Found Biome!
|
||||||
|
biomeRadar.scanBiome=Right click to scan for biome
|
||||||
|
|
||||||
|
enderporter.prevent=A mystical energy is preventing you from using this in the current world.
|
||||||
|
|
||||||
phrase.bop.useBOPATGWorldtype=The Biomes O' Plenty world type or ATG world type must be used in order for the new biomes to generate. This message will only display once.
|
phrase.bop.useBOPATGWorldtype=The Biomes O' Plenty world type or ATG world type must be used in order for the new biomes to generate. This message will only display once.
|
||||||
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.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=You are not using the latest recommended version of Biomes O' Plenty. The latest recommended version is: v%s for Minecraft %s
|
phrase.bop.updateAvaliable=You are not using the latest recommended version of Biomes O' Plenty. The latest recommended version is: v%s for Minecraft %s
|
||||||
|
|
Loading…
Reference in New Issue