Added Crashy TilePhantomNode
This commit is contained in:
@@ -92,6 +92,7 @@ import appeng.core.localization.GuiText;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.debug.BlockChunkloader;
|
||||
import appeng.debug.BlockItemGen;
|
||||
import appeng.debug.BlockPhantomNode;
|
||||
import appeng.debug.ToolDebugCard;
|
||||
import appeng.debug.ToolEraser;
|
||||
import appeng.debug.ToolMeteoritePlacer;
|
||||
@@ -418,6 +419,7 @@ public class Registration
|
||||
addFeature( ToolReplicatorCard.class );
|
||||
addFeature( BlockItemGen.class );
|
||||
addFeature( BlockChunkloader.class );
|
||||
addFeature( BlockPhantomNode.class );
|
||||
}
|
||||
|
||||
private AEItemDefinition addFeature(Class c, Object... Args)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package appeng.debug;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.features.AEFeature;
|
||||
|
||||
public class BlockPhantomNode extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockPhantomNode() {
|
||||
super( BlockPhantomNode.class, Material.iron );
|
||||
setfeature( EnumSet.of( AEFeature.UnsupportedDeveloperTools, AEFeature.Creative ) );
|
||||
setTileEntiy( TilePhantomNode.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TilePhantomNode tpn = getTileEntity( w, x, y, z );
|
||||
tpn.BOOM();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegistry)
|
||||
{
|
||||
registerNoIcons();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user