Applied-Energistics-2-tiler.../src/main/java/appeng/debug/TilePhantomNode.java
2014-09-23 19:26:27 -05:00

42 lines
762 B
Java

package appeng.debug;
import java.util.EnumSet;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridNode;
import appeng.me.helpers.AENetworkProxy;
import appeng.tile.grid.AENetworkTile;
public class TilePhantomNode extends AENetworkTile
{
protected AENetworkProxy RWAR = null;
boolean crashMode = false;
@Override
public void onReady()
{
super.onReady();
RWAR = createProxy();
RWAR.onReady();
crashMode = true;
}
@Override
public IGridNode getGridNode(ForgeDirection dir)
{
if ( !crashMode )
return super.getGridNode( dir );
return RWAR.getNode();
}
public void BOOM()
{
if ( RWAR != null )
{
crashMode = true;
RWAR.setValidSides( EnumSet.allOf( ForgeDirection.class ) );
}
}
}