Reduces visibility of internal fields/methods

Reduces the visibility of all fields to private and create setters/getters
when necessary. Exceptions are fields with GuiSync as these need to be
public.

Reduces the visibility of internal methods to private/protected/default when possible.
This commit is contained in:
yueh
2015-10-08 15:42:42 +02:00
parent f054bd699b
commit e94a0cfccf
497 changed files with 7865 additions and 6908 deletions
@@ -59,7 +59,7 @@ public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
this.setTileEntity( TileCharger.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
this.setFullSize( this.setOpaque( false ) );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -46,7 +46,7 @@ public class BlockInscriber extends AEBaseTileBlock
this.setTileEntity( TileInscriber.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
this.setFullSize( this.setOpaque( false ) );
this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
}
@@ -53,8 +53,8 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
super( Material.circuits );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
this.setFullSize( false );
this.setOpaque( false );
this.setTileEntity( TileLightDetector.class );
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
@@ -54,8 +54,8 @@ public class BlockPaint extends AEBaseTileBlock
this.setTileEntity( TilePaint.class );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
this.setFullSize( false );
this.setOpaque( false );
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
}
@@ -70,7 +70,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
final TileQuartzGrowthAccelerator cga = this.getTileEntity( w, pos );
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
if( cga != null && cga.isPowered() && CommonHelper.proxy.shouldAddParticles( r ) )
{
final double d0 = r.nextFloat() - 0.5F;
final double d1 = r.nextFloat() - 0.5F;
@@ -93,46 +93,41 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock
double dz = 0;
double dx = 0;
BlockPos pt = null;
switch( r.nextInt( 4 ) )
{
case 0:
dx = 0.6;
dz = d1;
final BlockPos pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() );
if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
{
return;
}
pt = new BlockPos( x + west.getFrontOffsetX(), y + west.getFrontOffsetY(), z + west.getFrontOffsetZ() );
break;
case 1:
dx = d1;
dz += 0.6;
pt = new BlockPos( x + forward.getFrontOffsetX(), y + forward.getFrontOffsetY(), z + forward.getFrontOffsetZ() );
if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
{
return;
}
pt = new BlockPos( x + forward.getFrontOffsetX(), y + forward.getFrontOffsetY(), z + forward.getFrontOffsetZ() );
break;
case 2:
dx = d1;
dz = -0.6;
pt = new BlockPos( x - forward.getFrontOffsetX(), y - forward.getFrontOffsetY(), z - forward.getFrontOffsetZ() );
if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
{
return;
}
pt = new BlockPos( x - forward.getFrontOffsetX(), y - forward.getFrontOffsetY(), z - forward.getFrontOffsetZ() );
break;
case 3:
dx = -0.6;
dz = d1;
pt = new BlockPos( x - west.getFrontOffsetX(), y - west.getFrontOffsetY(), z - west.getFrontOffsetZ() );
if( !w.getBlockState(pt).getBlock().isAir( w, pt) )
{
return;
}
pt = new BlockPos( x - west.getFrontOffsetX(), y - west.getFrontOffsetY(), z - west.getFrontOffsetZ() );
break;
}
if( !w.getBlockState( pt ).getBlock().isAir( w, pt ) )
{
return;
}
rx += dx * west.getFrontOffsetX();
ry += dx * west.getFrontOffsetY();
rz += dx * west.getFrontOffsetZ();
@@ -60,8 +60,8 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
this.setLightLevel( 0.9375F );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
this.setFullSize( false );
this.setOpaque( false );
}
@Override
@@ -46,7 +46,7 @@ public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
{
super( Material.iron );
this.setTileEntity( TileSkyCompass.class );
this.isOpaque = this.isFullSize = false;
this.setOpaque( this.setFullSize( false ) );
this.lightOpacity = 0;
this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
}
@@ -58,12 +58,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
super( Material.tnt );
this.setLightOpacity( 1 );
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
this.isFullSize = this.isOpaque = false;
this.setFullSize( this.setOpaque( false ) );
this.setStepSound( soundTypeGrass );
this.setHardness( 0F );
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance(), 16, 4, true );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.get( EntityTinyTNTPrimed.class ), AppEng.instance(), 16, 4, true );
}
@Override