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:
@@ -75,7 +75,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
protected boolean isInventory = false;
|
||||
private IFeatureHandler handler;
|
||||
@SideOnly( Side.CLIENT )
|
||||
BlockRenderInfo renderInfo;
|
||||
private BlockRenderInfo renderInfo;
|
||||
|
||||
protected AEBaseBlock( final Material mat )
|
||||
{
|
||||
@@ -155,7 +155,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return BaseBlockRender.class;
|
||||
}
|
||||
|
||||
public IIcon unmappedGetIcon( final IBlockAccess w, final int x, final int y, final int z, final int s )
|
||||
IIcon unmappedGetIcon( final IBlockAccess w, final int x, final int y, final int z, final int s )
|
||||
{
|
||||
return super.getIcon( w, x, y, z, s );
|
||||
}
|
||||
@@ -276,15 +276,15 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
{
|
||||
this.setBlockBounds( (float) bb.minX, (float) bb.minY, (float) bb.minZ, (float) bb.maxX, (float) bb.maxY, (float) bb.maxZ );
|
||||
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, ld.a, ld.b );
|
||||
final MovingObjectPosition r = super.collisionRayTrace( w, x, y, z, ld.getA(), ld.getB() );
|
||||
|
||||
this.setBlockBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
if( r != null )
|
||||
{
|
||||
final double xLen = ( ld.a.xCoord - r.hitVec.xCoord );
|
||||
final double yLen = ( ld.a.yCoord - r.hitVec.yCoord );
|
||||
final double zLen = ( ld.a.zCoord - r.hitVec.zCoord );
|
||||
final double xLen = ( ld.getA().xCoord - r.hitVec.xCoord );
|
||||
final double yLen = ( ld.getA().yCoord - r.hitVec.yCoord );
|
||||
final double zLen = ( ld.getA().zCoord - r.hitVec.zCoord );
|
||||
|
||||
final double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
|
||||
|
||||
@@ -528,7 +528,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
super.getSubBlocks( item, tabs, itemStacks );
|
||||
}
|
||||
|
||||
int mapRotation( final IBlockAccess w, final int x, final int y, final int z, final int s )
|
||||
private int mapRotation( final IBlockAccess w, final int x, final int y, final int z, final int s )
|
||||
{
|
||||
final IOrientable ori = this.getOrientable( w, x, y, z );
|
||||
|
||||
@@ -611,7 +611,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
public void addInformation( final ItemStack is, final EntityPlayer player, final List<String> lines, final boolean advancedItemTooltips )
|
||||
void addInformation( final ItemStack is, final EntityPlayer player, final List<String> lines, final boolean advancedItemTooltips )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
||||
this.features = !this.field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||
}
|
||||
|
||||
public AEBaseSlabBlock setSlabs( final AEBaseSlabBlock slabs )
|
||||
private AEBaseSlabBlock setSlabs( final AEBaseSlabBlock slabs )
|
||||
{
|
||||
this.slabs = slabs;
|
||||
return this;
|
||||
|
||||
@@ -98,7 +98,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
||||
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
|
||||
}
|
||||
|
||||
public boolean hasBlockTileEntity()
|
||||
private boolean hasBlockTileEntity()
|
||||
{
|
||||
return this.tileEntityType != null;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ import appeng.util.Platform;
|
||||
|
||||
public class BlockCraftingUnit extends AEBaseTileBlock
|
||||
{
|
||||
public static final int FLAG_FORMED = 8;
|
||||
static final int FLAG_FORMED = 8;
|
||||
|
||||
public BlockCraftingUnit()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ import appeng.util.Platform;
|
||||
public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
{
|
||||
|
||||
public static boolean booleanAlphaPass = false;
|
||||
private static boolean booleanAlphaPass = false;
|
||||
|
||||
public BlockMolecularAssembler()
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
@Override
|
||||
public boolean canRenderInPass( final int pass )
|
||||
{
|
||||
booleanAlphaPass = pass == 1;
|
||||
setBooleanAlphaPass( pass == 1 );
|
||||
return pass == 0 || pass == 1;
|
||||
}
|
||||
|
||||
@@ -84,4 +84,14 @@ public class BlockMolecularAssembler extends AEBaseTileBlock
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isBooleanAlphaPass()
|
||||
{
|
||||
return booleanAlphaPass;
|
||||
}
|
||||
|
||||
private static void setBooleanAlphaPass( final boolean booleanAlphaPass )
|
||||
{
|
||||
BlockMolecularAssembler.booleanAlphaPass = booleanAlphaPass;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
|
||||
|
||||
final TileQuartzGrowthAccelerator cga = this.getTileEntity( w, x, y, z );
|
||||
|
||||
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;
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
||||
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
|
||||
|
||||
@@ -64,6 +64,7 @@ import appeng.core.CommonHelper;
|
||||
import appeng.core.features.AECableBusFeatureHandler;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.AEGlassMaterial;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.IFMP;
|
||||
@@ -82,13 +83,19 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
{
|
||||
|
||||
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||
public static Class<? extends TileEntity> noTesrTile;
|
||||
public static Class<? extends TileEntity> tesrTile;
|
||||
private static Class<? extends TileEntity> noTesrTile;
|
||||
private static Class<? extends TileEntity> tesrTile;
|
||||
|
||||
/**
|
||||
* Immibis MB Support.
|
||||
*
|
||||
* It will look for a field named ImmibisMicroblocks_TransformableBlockMarker or
|
||||
* ImmibisMicroblocks_TransformableTileEntityMarker, modifiers, type, etc can be ignored.
|
||||
*/
|
||||
boolean ImmibisMicroblocks_TransformableBlockMarker = true;
|
||||
int myColorMultiplier = 0xffffff;
|
||||
@Reflected
|
||||
private static final boolean ImmibisMicroblocks_TransformableBlockMarker = true;
|
||||
|
||||
private int myColorMultiplier = 0xffffff;
|
||||
|
||||
public BlockCableBus()
|
||||
{
|
||||
@@ -396,7 +403,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
|
||||
if( te instanceof TileCableBus )
|
||||
{
|
||||
out = ( (TileCableBus) te ).cb;
|
||||
out = ( (TileCableBus) te ).getCableBus();
|
||||
}
|
||||
else if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FMP ) )
|
||||
{
|
||||
@@ -516,4 +523,14 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
{
|
||||
this.myColorMultiplier = color;
|
||||
}
|
||||
|
||||
public static Class<? extends TileEntity> getTesrTile()
|
||||
{
|
||||
return BlockCableBus.tesrTile;
|
||||
}
|
||||
|
||||
public static Class<? extends TileEntity> getNoTesrTile()
|
||||
{
|
||||
return BlockCableBus.noTesrTile;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,12 +150,12 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
}
|
||||
|
||||
public void setBoostBrightnessLow( final int boostBrightnessLow )
|
||||
void setBoostBrightnessLow( final int boostBrightnessLow )
|
||||
{
|
||||
this.boostBrightnessLow = boostBrightnessLow;
|
||||
}
|
||||
|
||||
public void setBoostBrightnessHigh( final int boostBrightnessHigh )
|
||||
void setBoostBrightnessHigh( final int boostBrightnessHigh )
|
||||
{
|
||||
this.boostBrightnessHigh = boostBrightnessHigh;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user