Basic reformat, hit once, hope never again

This commit is contained in:
thatsIch
2015-04-03 08:54:31 +02:00
parent 4ff1631f89
commit d34c988c88
886 changed files with 31400 additions and 30990 deletions
@@ -18,6 +18,7 @@
package appeng.block.misc;
import java.util.EnumSet;
import net.minecraft.block.material.Material;
@@ -34,10 +35,12 @@ import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileInterface;
import appeng.util.Platform;
public class BlockInterface extends AEBaseBlock
{
public BlockInterface() {
public BlockInterface()
{
super( BlockInterface.class, Material.iron );
this.setFeature( EnumSet.of( AEFeature.Core ) );
this.setTileEntity( TileInterface.class );
@@ -49,6 +52,22 @@ public class BlockInterface extends AEBaseBlock
return RenderBlockInterface.class;
}
@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;
TileInterface tg = this.getTileEntity( w, x, y, z );
if( tg != null )
{
if( Platform.isServer() )
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INTERFACE );
return true;
}
return false;
}
@Override
protected boolean hasCustomRotation()
{
@@ -56,27 +75,11 @@ public class BlockInterface extends AEBaseBlock
}
@Override
protected void customRotateBlock(IOrientable rotatable, ForgeDirection axis)
protected void customRotateBlock( IOrientable rotatable, ForgeDirection axis )
{
if ( rotatable instanceof TileInterface )
if( rotatable instanceof TileInterface )
{
((TileInterface) rotatable).setSide( axis );
( (TileInterface) rotatable ).setSide( axis );
}
}
@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;
TileInterface tg = this.getTileEntity( w, x, y, z );
if ( tg != null )
{
if ( Platform.isServer() )
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INTERFACE );
return true;
}
return false;
}
}