Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.block.spatial;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
@@ -42,6 +43,7 @@ import appeng.client.render.blocks.RenderNull;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
|
||||
public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
@@ -62,47 +64,46 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getCheckedSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> itemStacks)
|
||||
public void registerBlockIcons( IIconRegister iconRegistry )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void getCheckedSubBlocks( Item item, CreativeTabs tabs, List<ItemStack> itemStacks )
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegistry)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded(World world, int x, int y, int z, Explosion explosion)
|
||||
{
|
||||
// Don't explode.
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
|
||||
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<AxisAlignedBB> out, Entity e)
|
||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||
{
|
||||
out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z)
|
||||
public boolean canPlaceBlockAt( World world, int x, int y, int z )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockExploded( World world, int x, int y, int z, Explosion explosion )
|
||||
{
|
||||
// Don't explode.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy( IBlockAccess world, int x, int y, int z, Entity entity )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.block.spatial;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -32,37 +33,38 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.spatial.TileSpatialIOPort;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockSpatialIOPort extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockSpatialIOPort() {
|
||||
public BlockSpatialIOPort()
|
||||
{
|
||||
super( BlockSpatialIOPort.class, Material.iron );
|
||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
this.setTileEntity( TileSpatialIOPort.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
|
||||
public final void onNeighborBlockChange( World w, int x, int y, int z, Block junk )
|
||||
{
|
||||
TileSpatialIOPort te = this.getTileEntity( w, x, y, z );
|
||||
if ( te != null )
|
||||
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)
|
||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
if ( p.isSneaking() )
|
||||
if( p.isSneaking() )
|
||||
return false;
|
||||
|
||||
TileSpatialIOPort tg = this.getTileEntity( w, x, y, z );
|
||||
if ( tg != null )
|
||||
if( tg != null )
|
||||
{
|
||||
if ( Platform.isServer() )
|
||||
if( Platform.isServer() )
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.block.spatial;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -31,28 +32,30 @@ import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.tile.spatial.TileSpatialPylon;
|
||||
|
||||
|
||||
public class BlockSpatialPylon extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockSpatialPylon() {
|
||||
public BlockSpatialPylon()
|
||||
{
|
||||
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||
this.setTileEntity( TileSpatialPylon.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World w, int x, int y, int z, Block junk)
|
||||
public void onNeighborBlockChange( World w, int x, int y, int z, Block junk )
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||
if ( tsp != null )
|
||||
if( tsp != null )
|
||||
tsp.onNeighborBlockChange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess w, int x, int y, int z)
|
||||
public int getLightValue( IBlockAccess w, int x, int y, int z )
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||
if ( tsp != null )
|
||||
if( tsp != null )
|
||||
return tsp.getLightValue();
|
||||
return super.getLightValue( w, x, y, z );
|
||||
}
|
||||
@@ -62,5 +65,4 @@ public class BlockSpatialPylon extends AEBaseBlock
|
||||
{
|
||||
return RenderSpatialPylon.class;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user