mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Remove usage of 'localize(String, false)' in favor of localizeExact
This commit is contained in:
1 parent
f3ac159c52
commit
e1d60a5b19
20 files changed
+31
-30
No files matched your search
@@ -190,7 +190,7 @@ public class ItemConduitFacade extends Item implements IAdvancedTooltipProvider,
|
||||
SpecialTooltipHandler.addDetailedTooltipFromResources(list, itemstack);
|
||||
if(itemstack.getItemDamage() == FacadeType.HARDENED.ordinal()) {
|
||||
list.add("");
|
||||
list.add(EnderIO.lang.localize(getUnlocalizedName(itemstack) + ".tooltip", false));
|
||||
list.add(EnderIO.lang.localizeExact(getUnlocalizedName(itemstack) + ".tooltip"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
SpecialTooltipHandler.addTooltipFromResources(list, "enderio.gui.conduit.item.functionupgrade.line");
|
||||
for(FunctionUpgrade upgrade : FunctionUpgrade.values()) {
|
||||
list.add(EnderIO.lang.localize(upgrade.unlocName.concat(".name"), false));
|
||||
list.add(EnderIO.lang.localizeExact(upgrade.unlocName.concat(".name")));
|
||||
}
|
||||
functionUpgradeTooltip = new GuiToolTip(new Rectangle(x - 21 - 18*2, customTop + 3 + 34, 18, 18), list) {
|
||||
@Override
|
||||
|
||||
@@ -182,7 +182,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
|
||||
for (Target t : source.sendPriority) {
|
||||
IItemFilter f = t.inv.con.getOutputFilter(t.inv.conDir);
|
||||
if(input == null || f == null || f.doesItemPassFilter(t.inv, input)) {
|
||||
String s = EnderIO.lang.localize(t.inv.getInventory().getInventoryName(), false) + " " + t.inv.location + " Distance [" + t.distance + "] ";
|
||||
String s = EnderIO.lang.localizeExact(t.inv.getInventory().getInventoryName()) + " " + t.inv.location + " Distance [" + t.distance + "] ";
|
||||
result.add(s);
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ public class ItemConduitNetwork extends AbstractConduitNetwork<IItemConduit, IIt
|
||||
if(inv.hasTarget(con, dir)) {
|
||||
IItemFilter f = inv.con.getInputFilter(inv.conDir);
|
||||
if(input == null || f == null || f.doesItemPassFilter(inv, input)) {
|
||||
result.add(EnderIO.lang.localize(inv.getInventory().getInventoryName(), false) + " " + inv.location);
|
||||
result.add(EnderIO.lang.localizeExact(inv.getInventory().getInventoryName()) + " " + inv.location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,6 +159,6 @@ public class EnchantmentSoulBound extends Enchantment implements IAdvancedEnchan
|
||||
|
||||
@Override
|
||||
public String[] getTooltipDetails(ItemStack stack) {
|
||||
return new String[] { EnderIO.lang.localize("description.enchantment.enderio.soulBound", false) };
|
||||
return new String[] { EnderIO.lang.localizeExact("description.enchantment.enderio.soulBound") };
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ public class RedstoneModeButton extends IconButton {
|
||||
|
||||
public void setTooltipKey(String tooltipKey) {
|
||||
this.tooltipKey = tooltipKey;
|
||||
setToolTip(EnderIO.lang.localize(tooltipKey, false), model.getRedstoneControlMode().getTooltip());
|
||||
setToolTip(EnderIO.lang.localizeExact(tooltipKey), model.getRedstoneControlMode().getTooltip());
|
||||
}
|
||||
|
||||
private void nextMode() {
|
||||
@@ -83,7 +83,7 @@ public class RedstoneModeButton extends IconButton {
|
||||
return;
|
||||
}
|
||||
curMode = mode;
|
||||
setToolTip(EnderIO.lang.localize(tooltipKey, false), mode.getTooltip());
|
||||
setToolTip(EnderIO.lang.localizeExact(tooltipKey), mode.getTooltip());
|
||||
setIcon(ICONS[mode.ordinal()]);
|
||||
model.setRedstoneControlMode(mode);
|
||||
if(bc != null) {
|
||||
|
||||
@@ -73,13 +73,13 @@ public abstract class AbstractUpgrade implements IDarkSteelUpgrade {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addBasicEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) {
|
||||
list.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localize(getUnlocalizedName() + ".name", false));
|
||||
list.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localizeExact(getUnlocalizedName() + ".name"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List<String> list, boolean flag) {
|
||||
list.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localize(getUnlocalizedName() + ".name", false));
|
||||
list.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localizeExact(getUnlocalizedName() + ".name"));
|
||||
SpecialTooltipHandler.addDetailedTooltipFromResources(list, getUnlocalizedName());
|
||||
}
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ public class DarkSteelRecipeManager {
|
||||
if(!applyableUpgrades.isEmpty()) {
|
||||
list.add(EnumChatFormatting.YELLOW + EnderIO.lang.localize("tooltip.anvilupgrades") + " ");
|
||||
for (IDarkSteelUpgrade up : applyableUpgrades) {
|
||||
list.add(EnumChatFormatting.DARK_AQUA + "" + "" + EnderIO.lang.localize(up.getUnlocalizedName() + ".name", false) + ": ");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + "" + "" + EnderIO.lang.localizeExact(up.getUnlocalizedName() + ".name") + ": ");
|
||||
list.add(EnumChatFormatting.DARK_AQUA + "" + EnumChatFormatting.ITALIC + " " + up.getUpgradeItemName() + " + " + up.getLevelCost()
|
||||
+ " " + EnderIO.lang.localize("item.darkSteel.tooltip.lvs"));
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ public class EnergyUpgrade extends AbstractUpgrade {
|
||||
public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) {
|
||||
|
||||
List<String> upgradeStr = new ArrayList<String>();
|
||||
upgradeStr.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localize(getUnlocalizedName() + ".name", false));
|
||||
upgradeStr.add(EnumChatFormatting.DARK_AQUA + EnderIO.lang.localizeExact(getUnlocalizedName() + ".name"));
|
||||
SpecialTooltipHandler.addDetailedTooltipFromResources(upgradeStr, getUnlocalizedName());
|
||||
|
||||
String percDamage = (int)Math.round(getAbsorptionRatio(itemstack) * 100) + "";
|
||||
|
||||
@@ -535,7 +535,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
if(stack.hasDisplayName()) {
|
||||
name = stack.getDisplayName();
|
||||
} else {
|
||||
name = EnderIO.lang.localize(stack.getUnlocalizedName() + ".name", false);
|
||||
name = EnderIO.lang.localizeExact(stack.getUnlocalizedName() + ".name");
|
||||
}
|
||||
name += " " + EnderIO.lang.localize("machine.tooltip.configured");
|
||||
stack.setStackDisplayName(name);
|
||||
|
||||
@@ -2,6 +2,7 @@ package crazypants.enderio.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -38,20 +39,30 @@ public class TechneMachineRenderer<T extends AbstractMachineEntity> extends Tech
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
T te = (T) world.getTileEntity(x, y, z);
|
||||
if(te != null) {
|
||||
if (te != null) {
|
||||
setFacingDir(te.getFacingDir());
|
||||
overlay.setTile(te);
|
||||
}
|
||||
|
||||
super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
||||
|
||||
if(renderer.overrideBlockTexture == null) {
|
||||
if (renderer.overrideBlockTexture == null) {
|
||||
ccr.renderBlock(world, block, x, y, z, overlay);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IIcon getModelIcon(Block block, int metadata) {
|
||||
return ((AbstractMachineBlock<?>) block).getModelIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IIcon getModelIcon(IBlockAccess world, int x, int y, int z, Block block) {
|
||||
return getModelIcon(block, 0);
|
||||
}
|
||||
|
||||
private void setFacingDir(ForgeDirection dir) {
|
||||
VertexRotationFacing rot = (VertexRotationFacing) ((VertexTransformComposite) vt).xforms[0];
|
||||
rot.setRotation(dir);
|
||||
|
||||
@@ -155,7 +155,7 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
|
||||
String invName = EnderIO.lang.localize(getTileEntity().getInventoryName() + ".name", false);
|
||||
String invName = EnderIO.lang.localizeExact(getTileEntity().getInventoryName() + ".name");
|
||||
getFontRenderer().drawStringWithShadow(invName, sx + (xSize / 2) - (getFontRenderer().getStringWidth(invName) / 2), sy + 4, 0xFFFFFF);
|
||||
|
||||
if(getTileEntity().hasPower()) {
|
||||
|
||||
@@ -140,7 +140,7 @@ public class BlockCapBank extends BlockEio implements IGuiHandler, IAdvancedTool
|
||||
.getMaxEnergyStored()));
|
||||
if(itemstack.stackTagCompound != null && itemstack.stackTagCompound.hasKey("Items")) {
|
||||
NBTTagList itemList = (NBTTagList) itemstack.stackTagCompound.getTag("Items");
|
||||
String msg = EnderIO.lang.localize("tile.blockCapBank.tooltip.hasItems", false);
|
||||
String msg = EnderIO.lang.localizeExact("tile.blockCapBank.tooltip.hasItems");
|
||||
list.add(EnumChatFormatting.GOLD + MessageFormat.format(msg, itemList.tagCount()));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class GuiStirlingGenerator extends GuiPoweredMachineBase<TileEntityStirli
|
||||
private static String formatUpgrade(MessageFormat fmt, Capacitors upgrade) {
|
||||
float efficiency = getFactor(upgrade) / getFactor(Capacitors.BASIC_CAPACITOR);
|
||||
Object[] args = new Object[] {
|
||||
EnderIO.lang.localize(upgrade.unlocalisedName.concat(".name"), false),
|
||||
EnderIO.lang.localizeExact(upgrade.unlocalisedName.concat(".name")),
|
||||
efficiency,
|
||||
EnumChatFormatting.WHITE,
|
||||
EnumChatFormatting.GRAY
|
||||
|
||||
@@ -109,7 +109,7 @@ public class GuiInventoryPanel extends GuiMachineBase<TileInventoryPanel> {
|
||||
|
||||
headerCrafting = EnderIO.lang.localize("gui.inventorypanel.header.crafting");
|
||||
headerReturn = EnderIO.lang.localize("gui.inventorypanel.header.return");
|
||||
headerInventory = EnderIO.lang.localize("container.inventory", false);
|
||||
headerInventory = EnderIO.lang.localizeExact("container.inventory");
|
||||
infoTextFilter = EnderIO.lang.localize("gui.inventorypanel.info.filter");
|
||||
infoTextOffline = EnderIO.lang.localize("gui.inventorypanel.info.offline");
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ public class BlockPoweredSpawner extends AbstractMachineBlock<TilePoweredSpawner
|
||||
if(type != null) {
|
||||
list.add(StatCollector.translateToLocal("entity." + type + ".name"));
|
||||
} else {
|
||||
list.add(EnderIO.lang.localize("tile.blockPoweredSpawner.tooltip.empty", false));
|
||||
list.add(EnderIO.lang.localizeExact("tile.blockPoweredSpawner.tooltip.empty"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ public class GuiVacuumChest extends GuiContainerBase {
|
||||
headerChest = EnderIO.lang.localize("gui.vacuum.header.chest");
|
||||
headerFilter = EnderIO.lang.localize("gui.vacuum.header.filter");
|
||||
headerRange = EnderIO.lang.localize("gui.vacuum.header.range");
|
||||
headerInventory = EnderIO.lang.localize("container.inventory", false);
|
||||
headerInventory = EnderIO.lang.localizeExact("container.inventory");
|
||||
|
||||
((ContainerVacuumChest)inventorySlots).setFilterChangedCB(new Runnable() {
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user