mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
Localization of gui title elemets (#236)
This commit is contained in:
1 parent
48e30828cf
commit
5b8810633b
4 files changed
+17
-2
No files matched your search
@@ -44,6 +44,10 @@ public class BlockItemBuffer extends ItemBlockWithMetadata {
|
||||
return "tile." + ModObject.blockBuffer.unlocalisedName + "." + name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public String getGuiUnlocalizedName() {
|
||||
return "enderio.gui." + ModObject.blockBuffer.unlocalisedName + "." + name().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
public static ItemStack getStack(Type type) {
|
||||
return new ItemStack(EnderIO.blockBuffer, 1, type.ordinal());
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public class GuiBuffer extends GuiPoweredMachineBase<TileBuffer> {
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||
|
||||
String invName = EnderIO.lang.localizeExact(getTileEntity().getInventoryName() + ".name");
|
||||
String invName = EnderIO.lang.localizeExact(getTileEntity().getGuiInventoryName() + ".name");
|
||||
getFontRenderer().drawStringWithShadow(
|
||||
invName,
|
||||
sx + (xSize / 2) - (getFontRenderer().getStringWidth(invName) / 2),
|
||||
|
||||
@@ -38,6 +38,10 @@ public class TileBuffer extends AbstractPowerConsumerEntity implements IPaintabl
|
||||
return BlockItemBuffer.Type.get(this).getUnlocalizedName();
|
||||
}
|
||||
|
||||
public String getGuiInventoryName() {
|
||||
return BlockItemBuffer.Type.get(this).getGuiUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isMachineItemValidForSlot(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user