@Override @Nonnull public String getUnlocalizedName() { return EnderIOMachines.lang.addPrefix("block_powered_spawner.note." + langStr); }
private Lang(@Nonnull String key) { if (key.startsWith(".")) { this.key = getLang().addPrefix(key.substring(1)); } else { this.key = key; } }
private Lang(@Nonnull String key) { if (key.startsWith(".")) { this.key = getLang().addPrefix(key.substring(1)); } else { this.key = key; } }
private Lang(@Nonnull String key) { if (key.startsWith(".")) { this.key = getLang().addPrefix(key.substring(1)); } else { this.key = key; } }
private Lang(@Nonnull String key) { if (key.startsWith(".")) { this.key = getLang().addPrefix(key.substring(1)); } else { this.key = key; } }
/** * Localizes the string passed, first appending the prefix stored in this instance of the class. * * @param unloc * The unlocalized string. * * @return A localized string. */ public @Nonnull String localize(@Nonnull String unloc) { return localizeExact(addPrefix(unloc)); }
/** * Checks if the passed string (plus the prefix) has a localization mapped. * * @param unloc * The unlocalized suffix * @return True if there is a localization mapped, false otherwise. */ public boolean canLocalize(@Nonnull String unloc) { return canLocalizeExact(addPrefix(unloc)); }
private @Nonnull String loc(String string) { return string == null ? "(???)" : locRaw(EnderIO.lang.addPrefix(string)); }
/** * Localizes the string passed, first appending the prefix stored in this instance of the class. * * @param unloc * The unlocalized string. * @param args * The args to format the localized text with. * * @return A localized string. */ public @Nonnull String localize(@Nonnull String unloc, @Nonnull Object... args) { return localizeExact(addPrefix(unloc), args); }
private Lang(@Nonnull String key) { if (key.startsWith(".")) { this.key = getLang().addPrefix(NullHelper.notnullJ(key.substring(1), "String.substring()")); } else { this.key = key; } }
public static void sendEnabledChatMessage(String messageBase, boolean isActive) { String message = EnderIO.lang.addPrefix(messageBase.concat(isActive ? ".enabled" : ".disabled")); Minecraft.getMinecraft().player.sendStatusMessage(new TextComponentTranslation(message), true); }
network.setFluidTypeLocked(true); player.sendStatusMessage(new TextComponentTranslation(EnderIO.lang.addPrefix("itemLiquidConduit.lockedType"), fluid.getLocalizedName()), true);