Merge pull request #1346 from CrankySupertoon/1.12.2

Crystal Flux Localization
This commit is contained in:
Michael Hillcox 2020-11-20 16:25:58 +00:00 committed by GitHub
commit c49c73e15c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 4 deletions

View file

@ -14,7 +14,7 @@ buildscript {
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'idea'
version = "1.12.2-r151"
version = "1.12.2-r152"
group = "de.ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions"

View file

@ -21,6 +21,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.energy.CapabilityEnergy;
@ -53,7 +54,7 @@ public class RenderBatteryBox extends TileEntitySpecialRenderer<TileEntityBatter
String s = format.format(cap.getEnergyStored()) + "/" + format.format(cap.getMaxEnergyStored());
float lengthS = -font.getStringWidth(s) / 2F;
String s2 = "Crystal Flux";
String s2 = I18n.format("actuallyadditions.cflong");
float lengthS2 = -font.getStringWidth(s2) / 2F;
for (int i = 0; i < 4; i++) {

View file

@ -20,6 +20,7 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.client.config.GuiUtils;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -94,6 +95,6 @@ public class EnergyDisplay extends Gui {
private String getOverlayText() {
NumberFormat format = NumberFormat.getInstance();
return String.format("%s/%s Crystal Flux", format.format(this.rfReference.getEnergyStored()), format.format(this.rfReference.getMaxEnergyStored()));
return String.format("%s/%s %s", format.format(this.rfReference.getEnergyStored()), format.format(this.rfReference.getMaxEnergyStored()), I18n.format("actuallyadditions.cflong"));
}
}

View file

@ -18,6 +18,7 @@ import javax.annotation.Nullable;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@ -59,7 +60,7 @@ public abstract class ItemEnergy extends ItemBase {
IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null);
if (storage != null) {
NumberFormat format = NumberFormat.getInstance();
tooltip.add(String.format("%s/%s Crystal Flux", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored())));
tooltip.add(String.format("%s/%s %s", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored()), I18n.format("actuallyadditions.cflong")));
}
}
}

View file

@ -1,3 +1,6 @@
# 1.12.2-r152
* CrankySupertoon: Fixed Crystal Flux Localization
# 1.12.2-r151
* TomyLobo: Improved performance of the item interface.
* iTitus: Added configs for leaf and coal generators.