Basic reformat, hit once, hope never again
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.block.misc;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -44,10 +45,12 @@ import appeng.helpers.MetaRotation;
|
||||
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrientableBlock
|
||||
{
|
||||
|
||||
public BlockQuartzGrowthAccelerator() {
|
||||
public BlockQuartzGrowthAccelerator()
|
||||
{
|
||||
super( BlockQuartzGrowthAccelerator.class, Material.rock );
|
||||
this.setStepSound( Block.soundTypeMetal );
|
||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||
@@ -61,21 +64,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable(final IBlockAccess w, final int x, final int y, final int z)
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
{
|
||||
return new MetaRotation( w, x, y, z );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World w, int x, int y, int z, Random r)
|
||||
{
|
||||
if ( !AEConfig.instance.enableEffects )
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
return;
|
||||
|
||||
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
|
||||
|
||||
if ( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
if( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
double d0 = r.nextFloat() - 0.5F;
|
||||
double d1 = r.nextFloat() - 0.5F;
|
||||
@@ -95,34 +92,32 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||
ry += up.offsetY * d0;
|
||||
rz += up.offsetZ * d0;
|
||||
|
||||
switch (r.nextInt( 4 ))
|
||||
switch( r.nextInt( 4 ) )
|
||||
{
|
||||
case 0:
|
||||
dx = 0.6;
|
||||
dz = d1;
|
||||
if ( !w.getBlock( x + west.offsetX, y + west.offsetY, z + west.offsetZ ).isAir( w, x + west.offsetX, y + west.offsetY, z + west.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 1:
|
||||
dx = d1;
|
||||
dz += 0.6;
|
||||
if ( !w.getBlock( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ).isAir( w, x + forward.offsetX, y + forward.offsetY,
|
||||
z + forward.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
dx = d1;
|
||||
dz = -0.6;
|
||||
if ( !w.getBlock( x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ).isAir( w, x - forward.offsetX, y - forward.offsetY,
|
||||
z - forward.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 3:
|
||||
dx = -0.6;
|
||||
dz = d1;
|
||||
if ( !w.getBlock( x - west.offsetX, y - west.offsetY, z - west.offsetZ ).isAir( w, x - west.offsetX, y - west.offsetY, z - west.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 0:
|
||||
dx = 0.6;
|
||||
dz = d1;
|
||||
if( !w.getBlock( x + west.offsetX, y + west.offsetY, z + west.offsetZ ).isAir( w, x + west.offsetX, y + west.offsetY, z + west.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 1:
|
||||
dx = d1;
|
||||
dz += 0.6;
|
||||
if( !w.getBlock( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ).isAir( w, x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
dx = d1;
|
||||
dz = -0.6;
|
||||
if( !w.getBlock( x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ).isAir( w, x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
case 3:
|
||||
dx = -0.6;
|
||||
dz = d1;
|
||||
if( !w.getBlock( x - west.offsetX, y - west.offsetY, z - west.offsetZ ).isAir( w, x - west.offsetX, y - west.offsetY, z - west.offsetZ ) )
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
rx += dx * west.offsetX;
|
||||
@@ -143,4 +138,10 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
|
||||
{
|
||||
return new MetaRotation( w, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user