Relocate Source to proper directory.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package appeng.block.spatial;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderNull;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
public BlockMatrixFrame() {
|
||||
super( BlockMatrixFrame.class, Material.anvil);
|
||||
setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
setResistance( 6000000.0F );
|
||||
setBlockUnbreakable();
|
||||
setLightOpacity( 0 );
|
||||
isOpaque = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends BaseBlockRender> getRenderer()
|
||||
{
|
||||
return RenderNull.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item id, CreativeTabs tab, List list)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegistry)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
|
||||
{
|
||||
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
|
||||
// } );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e)
|
||||
{
|
||||
out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package appeng.block.spatial;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class BlockSpatialIOPort extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockSpatialIOPort() {
|
||||
super( BlockSpatialIOPort.class, Material.iron );
|
||||
setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
setTileEntity( TileSpatialIOPort.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
|
||||
{
|
||||
TileSpatialIOPort te = getTileEntity( w, x, y, z );
|
||||
if ( te != null )
|
||||
te.updateRedstoneState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if ( p.isSneaking() )
|
||||
return false;
|
||||
|
||||
TileSpatialIOPort tg = getTileEntity( w, x, y, z );
|
||||
if ( tg != null )
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIALIOPORT );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package appeng.block.spatial;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderSpatialPylon;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
|
||||
public class BlockSpatialPylon extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockSpatialPylon() {
|
||||
super( BlockSpatialPylon.class, AEGlassMaterial.instance );
|
||||
setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
setTileEntity( TileSpatialPylon.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
|
||||
{
|
||||
TileSpatialPylon tsp = getTileEntity( w, x, y, z );
|
||||
if ( tsp != null )
|
||||
tsp.onNeighborBlockChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess w, int x, int y, int z)
|
||||
{
|
||||
TileSpatialPylon tsp = getTileEntity( w, x, y, z );
|
||||
if ( tsp != null )
|
||||
return tsp.getLightValue();
|
||||
return super.getLightValue( w, x, y, z );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<? extends BaseBlockRender> getRenderer()
|
||||
{
|
||||
return RenderSpatialPylon.class;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user