un burn the house again

this should be the last time i swear
This commit is contained in:
Shadows_of_Fire 2017-07-28 16:17:52 -04:00
parent 912539e81d
commit ae736f384a
2 changed files with 5 additions and 4 deletions

View file

@ -30,6 +30,7 @@ import net.minecraft.util.ITickable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
@ -215,13 +216,13 @@ public abstract class TileEntityBase extends TileEntity implements ITickable{
return !oldState.getBlock().isAssociatedBlock(newState.getBlock());
}
public String getDisplayedName(){
return StringUtil.localize("container."+ModUtil.MOD_ID+"."+this.name+".name");
public String getNameForTranslation(){
return "container."+ModUtil.MOD_ID+"."+this.name+".name";
}
@Override
public ITextComponent getDisplayName(){
return new TextComponentString(this.getDisplayedName());
return new TextComponentTranslation(this.getNameForTranslation());
}
@Override

View file

@ -60,7 +60,7 @@ public final class AssetUtil{
@SideOnly(Side.CLIENT)
public static void displayNameString(FontRenderer font, int xSize, int yPositionOfMachineText, TileEntityBase tile){
displayNameString(font, xSize, yPositionOfMachineText, tile.getDisplayedName());
displayNameString(font, xSize, yPositionOfMachineText, StringUtil.localize(tile.getNameForTranslation()));
}
@SideOnly(Side.CLIENT)