diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java index c740be529..459636e1e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.network.PacketClientToServer; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -50,9 +51,7 @@ public class EnergyDisplay extends Gui{ this.outline = outline; this.drawTextNextTo = drawTextNextTo; - if(TileEntityBase.teslaLoaded){ - this.displayTesla = PlayerData.getDataFromPlayer(Minecraft.getMinecraft().thePlayer).theCompound.getBoolean("DisplayTesla"); - } + this.displayTesla = PlayerData.getDataFromPlayer(Minecraft.getMinecraft().thePlayer).theCompound.getBoolean("DisplayTesla"); } public void draw(){ @@ -87,9 +86,7 @@ public class EnergyDisplay extends Gui{ List text = new ArrayList(); text.add(this.getOverlayText()); - if(TileEntityBase.teslaLoaded){ - text.add(TextFormatting.GRAY+""+TextFormatting.ITALIC+"Click to change mode!"); - } + text.add(TextFormatting.GRAY+""+TextFormatting.ITALIC+StringUtil.localize("info."+ModUtil.MOD_ID+".energy.to"+(this.displayTesla ? "RF" : "T"))); GuiUtils.drawHoveringText(text, mouseX, mouseY, mc.displayWidth, mc.displayHeight, -1, mc.fontRendererObj); } } @@ -109,17 +106,15 @@ public class EnergyDisplay extends Gui{ } private void changeDisplayMode(){ - if(TileEntityBase.teslaLoaded){ - NBTTagCompound data = new NBTTagCompound(); + NBTTagCompound data = new NBTTagCompound(); - this.displayTesla = !this.displayTesla; - data.setBoolean("DisplayTesla", this.displayTesla); + this.displayTesla = !this.displayTesla; + data.setBoolean("DisplayTesla", this.displayTesla); - NBTTagCompound dataToSend = new NBTTagCompound(); - dataToSend.setTag("Data", data); - dataToSend.setInteger("WorldID", Minecraft.getMinecraft().theWorld.provider.getDimension()); - dataToSend.setInteger("PlayerID", Minecraft.getMinecraft().thePlayer.getEntityId()); - PacketHandler.theNetwork.sendToServer(new PacketClientToServer(dataToSend, PacketHandler.CHANGE_PLAYER_DATA_HANDLER)); - } + NBTTagCompound dataToSend = new NBTTagCompound(); + dataToSend.setTag("Data", data); + dataToSend.setInteger("WorldID", Minecraft.getMinecraft().theWorld.provider.getDimension()); + dataToSend.setInteger("PlayerID", Minecraft.getMinecraft().thePlayer.getEntityId()); + PacketHandler.theNetwork.sendToServer(new PacketClientToServer(dataToSend, PacketHandler.CHANGE_PLAYER_DATA_HANDLER)); } } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 1bd29c218..77e464663 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -572,6 +572,8 @@ info.actuallyadditions.booklet.edition=Edition info.actuallyadditions.deathRecorded=Your death has been recorded. Use a Death Tracker to find the death location! info.actuallyadditions.placer.sides.1=Placement Sides info.actuallyadditions.placer.sides.2=Usually when placing down blocks, they are placed towards the side of another block that you are looking at. Because the Phantom Placer can place blocks in mid-air, it doesn't know that. Usually you should just set it to a solid side. +info.actuallyadditions.energy.toRF=Click for Redstone Flux mode! +info.actuallyadditions.energy.toT=Click for Tesla mode! #Container Names container.actuallyadditions.inputter.name=ESD