diff --git a/src/main/java/appeng/container/AEBaseContainer.java b/src/main/java/appeng/container/AEBaseContainer.java index 4e77143f9..a17af31d6 100644 --- a/src/main/java/appeng/container/AEBaseContainer.java +++ b/src/main/java/appeng/container/AEBaseContainer.java @@ -1165,9 +1165,9 @@ public abstract class AEBaseContainer extends Container if( name != null ) { - if( name.hasCustomName() ) + if( name.hasCustomInventoryName() ) { - this.setCustomName( name.getCustomName() ); + this.setCustomName( name.getCustomInventoryName() ); } if( this.getCustomName() != null ) diff --git a/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java b/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java index 9c14d0479..a39fd9597 100644 --- a/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java +++ b/src/main/java/appeng/container/implementations/ContainerCraftingCPU.java @@ -255,13 +255,13 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH } @Override - public String getCustomName() + public String getCustomInventoryName() { return this.cpuName; } @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { return this.cpuName != null && this.cpuName.length() > 0; } diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index dd6374d6f..445bb451b 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -1151,9 +1151,9 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn final TileEntity hostTile = this.iHost.getTileEntity(); final World hostWorld = hostTile.getWorld(); - if( ( (ICustomNameObject) this.iHost ).hasCustomName() ) + if( ( (ICustomNameObject) this.iHost ).hasCustomInventoryName() ) { - return ( (ICustomNameObject) this.iHost ).getCustomName(); + return ( (ICustomNameObject) this.iHost ).getCustomInventoryName(); } final EnumSet possibleDirections = this.iHost.getTargets(); diff --git a/src/main/java/appeng/helpers/ICustomNameObject.java b/src/main/java/appeng/helpers/ICustomNameObject.java index c499e18b6..616814c8e 100644 --- a/src/main/java/appeng/helpers/ICustomNameObject.java +++ b/src/main/java/appeng/helpers/ICustomNameObject.java @@ -22,7 +22,7 @@ package appeng.helpers; public interface ICustomNameObject { - String getCustomName(); + String getCustomInventoryName(); - boolean hasCustomName(); + boolean hasCustomInventoryName(); } diff --git a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java index 248e3f5ff..ff51b6b54 100644 --- a/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java +++ b/src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java @@ -1243,15 +1243,15 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU for( final TileCraftingTile te : this.tiles ) { - if( te.hasCustomName() ) + if( te.hasCustomInventoryName() ) { if( this.myName.length() > 0 ) { - this.myName += ' ' + te.getCustomName(); + this.myName += ' ' + te.getCustomInventoryName(); } else { - this.myName = te.getCustomName(); + this.myName = te.getCustomInventoryName(); } } } diff --git a/src/main/java/appeng/tile/AEBaseInvTile.java b/src/main/java/appeng/tile/AEBaseInvTile.java index 817dfc7d7..aefba6d4a 100644 --- a/src/main/java/appeng/tile/AEBaseInvTile.java +++ b/src/main/java/appeng/tile/AEBaseInvTile.java @@ -55,7 +55,7 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor @Override public String getName() { - return this.getCustomName(); + return this.getCustomInventoryName(); } @TileEvent( TileEventType.WORLD_NBT_READ ) @@ -124,9 +124,14 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor * Returns if the inventory is named */ @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { - return this.getInternalInventory().hasCustomName(); + return super.hasCustomInventoryName(); + } + + @Override + public boolean hasCustomName() { + return this.hasCustomInventoryName(); } @Override @@ -218,7 +223,7 @@ public abstract class AEBaseInvTile extends AEBaseTile implements ISidedInventor { if( this.hasCustomName() ) { - return new TextComponentString( this.getCustomName() ); + return new TextComponentString( this.getCustomInventoryName() ); } return new TextComponentTranslation( this.getBlockType().getUnlocalizedName() ); } diff --git a/src/main/java/appeng/tile/AEBaseTile.java b/src/main/java/appeng/tile/AEBaseTile.java index 39cfda26c..923dc637c 100644 --- a/src/main/java/appeng/tile/AEBaseTile.java +++ b/src/main/java/appeng/tile/AEBaseTile.java @@ -570,10 +570,10 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, { final NBTTagCompound output = new NBTTagCompound(); - if( this.hasCustomName() ) + if( this.hasCustomInventoryName() ) { final NBTTagCompound dsp = new NBTTagCompound(); - dsp.setString( "Name", this.getCustomName() ); + dsp.setString( "Name", this.getCustomInventoryName() ); output.setTag( "display", dsp ); } @@ -605,13 +605,13 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, } @Override - public String getCustomName() + public String getCustomInventoryName() { - return this.hasCustomName() ? this.customName : this.getClass().getSimpleName(); + return this.hasCustomInventoryName() ? this.customName : this.getClass().getSimpleName(); } @Override - public boolean hasCustomName() + public boolean hasCustomInventoryName() { return this.customName != null && this.customName.length() > 0; }