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:
@@ -41,7 +41,7 @@ public abstract class AEBaseEntityItem extends EntityItem
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
public List<Entity> getCheckedEntitiesWithinAABBExcludingEntity( final AxisAlignedBB region )
|
||||
protected List<Entity> getCheckedEntitiesWithinAABBExcludingEntity( final AxisAlignedBB region )
|
||||
{
|
||||
return this.worldObj.getEntitiesWithinAABBExcludingEntity( this, region );
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ import appeng.util.Platform;
|
||||
public final class EntityChargedQuartz extends AEBaseEntityItem
|
||||
{
|
||||
|
||||
int delay = 0;
|
||||
int transformTime = 0;
|
||||
private int delay = 0;
|
||||
private int transformTime = 0;
|
||||
|
||||
@Reflected
|
||||
public EntityChargedQuartz( final World w )
|
||||
@@ -96,7 +96,7 @@ public final class EntityChargedQuartz extends AEBaseEntityItem
|
||||
}
|
||||
}
|
||||
|
||||
public boolean transform()
|
||||
private boolean transform()
|
||||
{
|
||||
final ItemStack item = this.getEntityItem();
|
||||
final IMaterials materials = AEApi.instance().definitions().materials();
|
||||
|
||||
@@ -29,8 +29,8 @@ public final class EntityFloatingItem extends EntityItem
|
||||
{
|
||||
|
||||
private final Entity parent;
|
||||
int superDeath = 0;
|
||||
float progress = 0;
|
||||
private int superDeath = 0;
|
||||
private float progress = 0;
|
||||
|
||||
public EntityFloatingItem( final Entity parent, final World world, final double x, final double y, final double z, final ItemStack stack )
|
||||
{
|
||||
@@ -68,4 +68,9 @@ public final class EntityFloatingItem extends EntityItem
|
||||
this.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
float getProgress()
|
||||
{
|
||||
return this.progress;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ import net.minecraft.entity.Entity;
|
||||
|
||||
public final class EntityIds
|
||||
{
|
||||
public static final int TINY_TNT = 10;
|
||||
public static final int SINGULARITY = 11;
|
||||
public static final int CHARGED_QUARTZ = 12;
|
||||
public static final int GROWING_CRYSTAL = 13;
|
||||
private static final int TINY_TNT = 10;
|
||||
private static final int SINGULARITY = 11;
|
||||
private static final int CHARGED_QUARTZ = 12;
|
||||
private static final int GROWING_CRYSTAL = 13;
|
||||
|
||||
private EntityIds()
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class EntitySingularity extends AEBaseEntityItem
|
||||
return super.attackEntityFrom( src, dmg );
|
||||
}
|
||||
|
||||
public void doExplosion()
|
||||
private void doExplosion()
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
package appeng.entity;
|
||||
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.DoubleBuffer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
||||
@@ -30,21 +29,17 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
public class RenderFloatingItem extends RenderEntityItem
|
||||
{
|
||||
|
||||
public static DoubleBuffer buffer = ByteBuffer.allocateDirect( 8 * 4 ).asDoubleBuffer();
|
||||
|
||||
public RenderFloatingItem( final RenderManager manager)
|
||||
public RenderFloatingItem( final RenderManager manager )
|
||||
{
|
||||
super(manager,Minecraft.getMinecraft().getRenderItem());
|
||||
super( manager, Minecraft.getMinecraft().getRenderItem() );
|
||||
this.shadowOpaque = 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doRender(
|
||||
final Entity entityItem,
|
||||
@@ -57,7 +52,7 @@ public class RenderFloatingItem extends RenderEntityItem
|
||||
if( entityItem instanceof EntityFloatingItem )
|
||||
{
|
||||
final EntityFloatingItem efi = (EntityFloatingItem) entityItem;
|
||||
if( efi.progress > 0.0 )
|
||||
if( efi.getProgress() > 0.0 )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
package appeng.entity;
|
||||
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
@@ -31,8 +33,6 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import appeng.client.render.ModelGenerator;
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ public class RenderTinyTNTPrimed extends Render
|
||||
|
||||
private final ModelGenerator blockRenderer = new ModelGenerator();
|
||||
|
||||
public RenderTinyTNTPrimed( final RenderManager p_i46134_1_)
|
||||
{
|
||||
super(p_i46134_1_);
|
||||
public RenderTinyTNTPrimed( final RenderManager p_i46134_1_ )
|
||||
{
|
||||
super( p_i46134_1_ );
|
||||
this.shadowSize = 0.5F;
|
||||
}
|
||||
|
||||
@@ -54,11 +54,11 @@ public class RenderTinyTNTPrimed extends Render
|
||||
this.renderPrimedTNT( (EntityTinyTNTPrimed) tnt, x, y, z, unused, life );
|
||||
}
|
||||
|
||||
public void renderPrimedTNT( final EntityTinyTNTPrimed tnt, final double x, final double y, final double z, final float unused, final float life )
|
||||
private void renderPrimedTNT( final EntityTinyTNTPrimed tnt, final double x, final double y, final double z, final float unused, final float life )
|
||||
{
|
||||
final BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)x, (float)y + 0.5F, (float)z);
|
||||
final BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate( (float) x, (float) y + 0.5F, (float) z );
|
||||
float f2;
|
||||
|
||||
if( tnt.fuse - life + 1.0F < 10.0F )
|
||||
@@ -82,32 +82,32 @@ public class RenderTinyTNTPrimed extends Render
|
||||
}
|
||||
|
||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||
f2 = (1.0F - (tnt.fuse - life + 1.0F) / 100.0F) * 0.8F;
|
||||
this.bindEntityTexture(tnt);
|
||||
GlStateManager.translate(-0.5F, -0.5F, 0.5F);
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), tnt.getBrightness(life));
|
||||
GlStateManager.translate(0.0F, 0.0F, 1.0F);
|
||||
f2 = ( 1.0F - ( tnt.fuse - life + 1.0F ) / 100.0F ) * 0.8F;
|
||||
this.bindEntityTexture( tnt );
|
||||
GlStateManager.translate( -0.5F, -0.5F, 0.5F );
|
||||
blockrendererdispatcher.renderBlockBrightness( Blocks.tnt.getDefaultState(), tnt.getBrightness( life ) );
|
||||
GlStateManager.translate( 0.0F, 0.0F, 1.0F );
|
||||
|
||||
if( tnt.fuse / 5 % 2 == 0 )
|
||||
{
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 772);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, f2);
|
||||
GlStateManager.doPolygonOffset(-3.0F, -3.0F);
|
||||
GlStateManager.enablePolygonOffset();
|
||||
blockrendererdispatcher.renderBlockBrightness(Blocks.tnt.getDefaultState(), 1.0F);
|
||||
GlStateManager.doPolygonOffset(0.0F, 0.0F);
|
||||
GlStateManager.disablePolygonOffset();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc( 770, 772 );
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, f2 );
|
||||
GlStateManager.doPolygonOffset( -3.0F, -3.0F );
|
||||
GlStateManager.enablePolygonOffset();
|
||||
blockrendererdispatcher.renderBlockBrightness( Blocks.tnt.getDefaultState(), 1.0F );
|
||||
GlStateManager.doPolygonOffset( 0.0F, 0.0F );
|
||||
GlStateManager.disablePolygonOffset();
|
||||
GlStateManager.color( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
super.doRender(tnt, x, y, z, unused, life );
|
||||
GlStateManager.popMatrix();
|
||||
super.doRender( tnt, x, y, z, unused, life );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user