Added Meteorite Spawn Distance Setting.

Added Charged Quartz Spawn Chance.
All GUI's Parts/Tiles support Custom Localization. ( Fixes #0190 )
Added Crafting Recipe for copying Press Plates.
Fixed Bug: #0189 - Particles don't turn off when set to minimal
Fixed Bug: #0176 - Weird Colorization While Mining Parts.
Fixed Bug: #0152 - TPane drops parts as items and does not insert into system.
Fixed Bug: #0140 - Spatial pylon facade renders oddly (Clear)
This commit is contained in:
AlgorithmX2
2014-03-15 01:58:21 -05:00
parent 754d2c25d9
commit d4ff8e731d
39 changed files with 269 additions and 64 deletions
+28 -1
View File
@@ -27,6 +27,7 @@ import appeng.api.util.IConfigureableObject;
import appeng.api.util.IOrientable;
import appeng.core.AELog;
import appeng.core.features.ItemStackSrc;
import appeng.helpers.ICustomNameObject;
import appeng.helpers.IPriorityHost;
import appeng.tile.events.AETileEventHandler;
import appeng.tile.events.TileEventType;
@@ -34,7 +35,7 @@ import appeng.tile.inventory.AppEngInternalAEInventory;
import appeng.util.Platform;
import appeng.util.SettingsFrom;
public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile, ICustomNameObject
{
private final EnumMap<TileEventType, List<AETileEventHandler>> handlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
@@ -45,6 +46,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
public boolean dropItems = true;
public int renderFragment = 0;
public String customName;
public TileEntity getTile()
{
@@ -120,6 +122,9 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
data.setString( "orientation_up", up.name() );
}
if ( customName != null )
data.setString( "customName", customName );
for (AETileEventHandler h : getHandlerListFor( TileEventType.WORLD_NBT ))
h.writeToNBT( data );
}
@@ -129,6 +134,11 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
{
super.readFromNBT( data );
if ( data.hasKey( "customName" ) )
customName = data.getString( "customName" );
else
customName = null;
try
{
if ( canBeRotated() )
@@ -413,4 +423,21 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile
return false;
}
public void setName(String name)
{
this.customName = name;
}
@Override
public String getCustomName()
{
return hasCustomName() ? customName : getClass().getSimpleName();
}
@Override
public boolean hasCustomName()
{
return customName != null && customName.length() > 0;
}
}