mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 11:59:17 +00:00
Merge pull request #1738 from Adaptivity/localizewailaandtooltips
Localized waila and tooltips
This commit is contained in:
commit
9b0aec5bb1
7 files changed
+81
-40
No files matched your search
@@ -26,6 +26,7 @@ import crazypants.enderio.machine.painter.IPaintedBlock;
|
||||
import crazypants.enderio.machine.painter.PaintSourceValidator;
|
||||
import crazypants.enderio.machine.painter.PainterUtil;
|
||||
import crazypants.util.Util;
|
||||
import crazypants.util.Lang;
|
||||
|
||||
public class ItemConduitFacade extends Item implements IAdvancedTooltipProvider {
|
||||
|
||||
@@ -119,7 +120,7 @@ public class ItemConduitFacade extends Item implements IAdvancedTooltipProvider
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addBasicEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
|
||||
if(PainterUtil.getSourceBlock(itemstack) == null) {
|
||||
list.add("Not Painted");
|
||||
list.add(Lang.localize("item.itemConduitFacade.tooltip.notpainted"));
|
||||
} else {
|
||||
list.add(PainterUtil.getTooltTipText(itemstack));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TooltipAddera {
|
||||
if(!addStirlinGeneratorTooltip(evt)) {
|
||||
int time = TileEntityFurnace.getItemBurnTime(evt.itemStack);
|
||||
if(time > 0) {
|
||||
evt.toolTip.add("Burn time " + time);
|
||||
evt.toolTip.add(Lang.localize("tooltip.burntime") + " " + time);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class TooltipAddera {
|
||||
uid = GameRegistry.findUniqueIdentifierFor(evt.itemStack.getItem());
|
||||
}
|
||||
if(uid != null) {
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + "UID: " + uid.toString() + " Meta: " + evt.itemStack.getItemDamage());
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + Lang.localize("tooltip.uid") + " " + uid.toString() + " " + Lang.localize("tooltip.meta") + " " + evt.itemStack.getItemDamage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,9 +116,9 @@ public class TooltipAddera {
|
||||
int[] ids = OreDictionary.getOreIDs(evt.itemStack);
|
||||
if(ids != null && ids.length > 0) {
|
||||
if(ids.length == 1) {
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + "Ore Dictionary: " + OreDictionary.getOreName(ids[0]));
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + Lang.localize("tooltip.oredict") + " " + OreDictionary.getOreName(ids[0]));
|
||||
} else {
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + "Ore Dictionary:");
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + Lang.localize("tooltip.oredict"));
|
||||
for (int id : ids) {
|
||||
String name = OreDictionary.getOreName(id);
|
||||
evt.toolTip.add(EnumChatFormatting.AQUA + " " + name);
|
||||
|
||||
@@ -364,7 +364,7 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
|
||||
if(mobName != null) {
|
||||
par3List.add(EntityUtil.getDisplayNameForEntity(mobName));
|
||||
} else {
|
||||
par3List.add("Empty");
|
||||
par3List.add(Lang.localize("item.itemSoulVessel.tooltip.empty"));
|
||||
}
|
||||
|
||||
float health = getHealthFromStack(par1ItemStack);
|
||||
|
||||
@@ -187,7 +187,7 @@ public class DarkSteelRecipeManager {
|
||||
}
|
||||
}
|
||||
if(!applyableUpgrades.isEmpty()) {
|
||||
list.add(EnumChatFormatting.YELLOW + "Anvil Upgrades: ");
|
||||
list.add(EnumChatFormatting.YELLOW + Lang.localize("tooltip.anvilupgrades") + " ");
|
||||
for (IDarkSteelUpgrade up : applyableUpgrades) {
|
||||
list.add(EnumChatFormatting.DARK_AQUA + "" + "" + Lang.localize(up.getUnlocalizedName() + ".name", false) + ": ");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + "" + EnumChatFormatting.ITALIC + " " + up.getUpgradeItemName() + " + " + up.getLevelCost()
|
||||
|
||||
@@ -113,7 +113,7 @@ public class WailaCompat implements IWailaDataProvider {
|
||||
// registrar.registerHeadProvider(INSTANCE, IInternalPowerReceptor.class);
|
||||
// registrar.registerSyncedNBTKey("*", IInternalPowerReceptor.class);
|
||||
|
||||
ConfigHandler.instance().addConfig(EnderIO.MOD_NAME, "facades.hidden", "Sneaky Facades");
|
||||
ConfigHandler.instance().addConfig(EnderIO.MOD_NAME, "facades.hidden", Lang.localize("waila.config.hiddenfacades"));
|
||||
IWailaInfoProvider.fmt.setMaximumFractionDigits(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user