Internal change to fix Named Inventories. This change will not affect the reobfed version (much).
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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<EnumFacing> possibleDirections = this.iHost.getTargets();
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.helpers;
|
||||
public interface ICustomNameObject
|
||||
{
|
||||
|
||||
String getCustomName();
|
||||
String getCustomInventoryName();
|
||||
|
||||
boolean hasCustomName();
|
||||
boolean hasCustomInventoryName();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user