final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
@@ -46,8 +46,8 @@ import appeng.util.ReadableNumberConverter;
public class AppEngRenderItem extends RenderItem
{
public AppEngRenderItem(
TextureManager textureManager,
ModelManager modelManager )
final TextureManager textureManager,
final ModelManager modelManager )
{
super( textureManager, modelManager );
}
@@ -59,35 +59,35 @@ public class AppEngRenderItem extends RenderItem
@Override
public void renderItemOverlayIntoGUI(
FontRenderer fontRenderer,
ItemStack is,
int xPos,
int yPos,
String text )
final FontRenderer fontRenderer,
final ItemStack is,
final int xPos,
final int yPos,
final String text )
{
if( is != null )
{
float scaleFactor = AEConfig.instance.useTerminalUseLargeFont() ? 0.85f : 0.5f;
float inverseScaleFactor = 1.0f / scaleFactor;
int offset = AEConfig.instance.useTerminalUseLargeFont() ? 0 : -1;
final float scaleFactor = AEConfig.instance.useTerminalUseLargeFont() ? 0.85f : 0.5f;
final float inverseScaleFactor = 1.0f / scaleFactor;
final int offset = AEConfig.instance.useTerminalUseLargeFont() ? 0 : -1;
boolean unicodeFlag = fontRenderer.getUnicodeFlag();
final boolean unicodeFlag = fontRenderer.getUnicodeFlag();
fontRenderer.setUnicodeFlag( false );
if( is.getItem().showDurabilityBar( is ) )
{
double health = is.getItem().getDurabilityForDisplay( is );
int j1 = (int) Math.round( 13.0D - health * 13.0D );
int k = (int) Math.round( 255.0D - health * 255.0D );
final double health = is.getItem().getDurabilityForDisplay( is );
final int j1 = (int) Math.round( 13.0D - health * 13.0D );
final int k = (int) Math.round( 255.0D - health * 255.0D );
GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable( GL11.GL_DEPTH_TEST );
GL11.glDisable( GL11.GL_TEXTURE_2D );
GL11.glDisable( GL11.GL_ALPHA_TEST );
GL11.glDisable( GL11.GL_BLEND );
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer wr = tessellator.getWorldRenderer();
int l = 255 - k << 16 | k << 8;
int i1 = ( 255 - k ) / 4 << 16 | 16128;
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer wr = tessellator.getWorldRenderer();
final int l = 255 - k << 16 | k << 8;
final int i1 = ( 255 - k ) / 4 << 16 | 16128;
this.renderQuad( tessellator, xPos + 2, yPos + 13, 13, 2, 0 );
this.renderQuad( tessellator, xPos + 2, yPos + 13, 12, 1, i1 );
this.renderQuad( tessellator, xPos + 2, yPos + 13, j1, 1, l );
@@ -100,20 +100,20 @@ public class AppEngRenderItem extends RenderItem
if( is.stackSize == 0 )
{
String craftLabelText = AEConfig.instance.useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
final String craftLabelText = AEConfig.instance.useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft.getLocal();
GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable( GL11.GL_DEPTH_TEST );
GL11.glPushMatrix();
GL11.glScaled( scaleFactor, scaleFactor, scaleFactor );
int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( craftLabelText ) * scaleFactor ) * inverseScaleFactor );
int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
final int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( craftLabelText ) * scaleFactor ) * inverseScaleFactor );
final int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
fontRenderer.drawStringWithShadow( craftLabelText, X, Y, 16777215 );
GL11.glPopMatrix();
GL11.glEnable( GL11.GL_LIGHTING );
GL11.glEnable( GL11.GL_DEPTH_TEST );
}
long amount = this.aeStack != null ? this.aeStack.getStackSize() : is.stackSize;
final long amount = this.aeStack != null ? this.aeStack.getStackSize() : is.stackSize;
if( amount != 0 )
{
final String stackSize = this.getToBeRenderedStackSize( amount );
@@ -122,8 +122,8 @@ public class AppEngRenderItem extends RenderItem
GL11.glDisable( GL11.GL_DEPTH_TEST );
GL11.glPushMatrix();
GL11.glScaled( scaleFactor, scaleFactor, scaleFactor );
int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( stackSize ) * scaleFactor ) * inverseScaleFactor );
int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
final int X = (int) ( ( (float) xPos + offset + 16.0f - fontRenderer.getStringWidth( stackSize ) * scaleFactor ) * inverseScaleFactor );
final int Y = (int) ( ( (float) yPos + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
fontRenderer.drawStringWithShadow( stackSize, X, Y, 16777215 );
GL11.glPopMatrix();
GL11.glEnable( GL11.GL_LIGHTING );
@@ -134,9 +134,9 @@ public class AppEngRenderItem extends RenderItem
}
}
private void renderQuad( Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6 )
private void renderQuad( final Tessellator par1Tessellator, final int par2, final int par3, final int par4, final int par5, final int par6 )
{
WorldRenderer wr = par1Tessellator.getWorldRenderer();
final WorldRenderer wr = par1Tessellator.getWorldRenderer();
wr.startDrawingQuads();
wr.setColorOpaque_I( par6 );
@@ -147,7 +147,7 @@ public class AppEngRenderItem extends RenderItem
par1Tessellator.draw();
}
private String getToBeRenderedStackSize( long originalSize )
private String getToBeRenderedStackSize( final long originalSize )
{
if( AEConfig.instance.useTerminalUseLargeFont() )
{
@@ -73,7 +73,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
this( false, 20 );
}
public BaseBlockRender( boolean enableTESR, double renderDistance )
public BaseBlockRender( final boolean enableTESR, final double renderDistance )
{
this.hasTESR = enableTESR;
this.renderDistance = renderDistance;
@@ -262,7 +262,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return this.hasTESR;
}
protected int adjustBrightness( int v, double d )
protected int adjustBrightness( final int v, final double d )
{
int r = 0xff & ( v >> 16 );
int g = 0xff & ( v >> 8 );
@@ -284,9 +284,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return this.renderDistance;
}
public void renderInventory( B block, ItemStack item, ModelGenerator renderer, ItemRenderType type, Object[] data )
public void renderInventory( final B block, final ItemStack item, final ModelGenerator renderer, final ItemRenderType type, final Object[] data )
{
BlockRenderInfo info = block.getRendererInstance();
final BlockRenderInfo info = block.getRendererInstance();
if( info.isValid() )
{
if( block.hasSubtypes() )
@@ -314,7 +314,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
public static int getOrientation( EnumFacing in, EnumFacing forward, EnumFacing up )
public static int getOrientation( final EnumFacing in, final EnumFacing forward, final EnumFacing up )
{
if( in == null // 1
|| forward == null // 2
@@ -323,22 +323,22 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return 0;
}
int a = in.ordinal();
int b = forward.ordinal();
int c = up.ordinal();
final int a = in.ordinal();
final int b = forward.ordinal();
final int c = up.ordinal();
return ORIENTATION_MAP[a][b][c];
}
public void renderInvBlock( EnumSet<AEPartLocation> sides, B block, ItemStack item, int color, ModelGenerator tess )
public void renderInvBlock( final EnumSet<AEPartLocation> sides, final B block, final ItemStack item, final int color, final ModelGenerator tess )
{
if( block != null && block.hasSubtypes() && item != null )
{
int meta = item.getItemDamage();
final int meta = item.getItemDamage();
}
IAESprite[] icons = tess.getIcon( item == null ? block.getDefaultState() : block.getStateFromMeta( item.getMetadata() ) );
BlockPos zero = new BlockPos(0,0,0);
final IAESprite[] icons = tess.getIcon( item == null ? block.getDefaultState() : block.getStateFromMeta( item.getMetadata() ) );
final BlockPos zero = new BlockPos(0,0,0);
if( sides.contains( AEPartLocation.DOWN ) )
{
@@ -383,9 +383,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
}
public IAESprite firstNotNull( IAESprite... s )
public IAESprite firstNotNull( final IAESprite... s )
{
for( IAESprite o : s )
for( final IAESprite o : s )
{
if( o != null )
{
@@ -395,25 +395,25 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ExtraBlockTextures.getMissing();
}
public boolean renderInWorld( B block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final B block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
this.preRenderInWorld( block, world, pos, renderer );
boolean o = renderer.renderStandardBlock( block, pos );
final boolean o = renderer.renderStandardBlock( block, pos );
this.postRenderInWorld( renderer );
return o;
}
public void preRenderInWorld( B block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public void preRenderInWorld( final B block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
BlockRenderInfo info = block.getRendererInstance();
IOrientable te = this.getOrientable( block, world, pos );
final BlockRenderInfo info = block.getRendererInstance();
final IOrientable te = this.getOrientable( block, world, pos );
if( te != null )
{
EnumFacing forward = te.getForward();
EnumFacing up = te.getUp();
final EnumFacing forward = te.getForward();
final EnumFacing up = te.getUp();
renderer.uvRotateBottom = info.getTexture( AEPartLocation.DOWN ).setFlip( getOrientation( EnumFacing.DOWN, forward, up ) );
renderer.uvRotateTop = info.getTexture( AEPartLocation.UP ).setFlip( getOrientation( EnumFacing.UP, forward, up ) );
@@ -426,29 +426,29 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
}
public void postRenderInWorld( ModelGenerator renderer )
public void postRenderInWorld( final ModelGenerator renderer )
{
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
@Nullable
public IOrientable getOrientable( B block, IBlockAccess w, BlockPos pos )
public IOrientable getOrientable( final B block, final IBlockAccess w, final BlockPos pos )
{
return block.getOrientable( w, pos );
}
protected void setInvRenderBounds( ModelGenerator renderer, int i, int j, int k, int l, int m, int n )
protected void setInvRenderBounds( final ModelGenerator renderer, final int i, final int j, final int k, final int l, final int m, final int n )
{
renderer.setRenderBounds( i / 16.0, j / 16.0, k / 16.0, l / 16.0, m / 16.0, n / 16.0 );
}
protected void renderBlockBounds( ModelGenerator renderer,
protected void renderBlockBounds( final ModelGenerator renderer,
double minX, double minY, double minZ,
double maxX, double maxY, double maxZ,
EnumFacing x, EnumFacing y, EnumFacing z )
final EnumFacing x, final EnumFacing y, final EnumFacing z )
{
minX /= 16.0;
minY /= 16.0;
@@ -492,7 +492,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
protected void renderCutoutFace( B block, IAESprite ico, BlockPos pos, ModelGenerator tess, EnumFacing orientation, float edgeThickness )
protected void renderCutoutFace( final B block, final IAESprite ico, final BlockPos pos, final ModelGenerator tess, final EnumFacing orientation, final float edgeThickness )
{
double offsetX = 0.0;
double offsetY = 0.0;
@@ -555,8 +555,8 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
offsetY += pos.getY();
offsetZ += pos.getZ();
double layerBX = 0.0;
double layerAY = 0.0;
final double layerBX = 0.0;
final double layerAY = 0.0;
this.renderFace(orientation, tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
// u -> u
0, 1.0,
@@ -583,7 +583,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
private void renderFace( EnumFacing face, ModelGenerator tess, double offsetX, double offsetY, double offsetZ, double ax, double ay, double az, double bx, double by, double bz, double ua, double ub, double va, double vb, IAESprite ico, boolean flip )
private void renderFace( final EnumFacing face, final ModelGenerator tess, final double offsetX, final double offsetY, final double offsetZ, final double ax, final double ay, final double az, final double bx, final double by, final double bz, final double ua, final double ub, final double va, final double vb, final IAESprite ico, final boolean flip )
{
if( flip )
{
@@ -602,7 +602,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
protected void renderFace( BlockPos pos, B block, IAESprite ico, ModelGenerator renderer, EnumFacing orientation )
protected void renderFace( final BlockPos pos, final B block, final IAESprite ico, final ModelGenerator renderer, final EnumFacing orientation )
{
switch( orientation )
{
@@ -629,18 +629,18 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
}
public void selectFace( ModelGenerator renderer, EnumFacing west, EnumFacing up, EnumFacing forward, int u1, int u2, int v1, int v2 )
public void selectFace( final ModelGenerator renderer, final EnumFacing west, final EnumFacing up, final EnumFacing forward, final int u1, final int u2, int v1, int v2 )
{
v1 = 16 - v1;
v2 = 16 - v2;
double minX = ( forward.getFrontOffsetX() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetX(), u1 ) + this.mapFaceUV( up.getFrontOffsetX(), v1 );
double minY = ( forward.getFrontOffsetY() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetY(), u1 ) + this.mapFaceUV( up.getFrontOffsetY(), v1 );
double minZ = ( forward.getFrontOffsetZ() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetZ(), u1 ) + this.mapFaceUV( up.getFrontOffsetZ(), v1 );
final double minX = ( forward.getFrontOffsetX() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetX(), u1 ) + this.mapFaceUV( up.getFrontOffsetX(), v1 );
final double minY = ( forward.getFrontOffsetY() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetY(), u1 ) + this.mapFaceUV( up.getFrontOffsetY(), v1 );
final double minZ = ( forward.getFrontOffsetZ() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetZ(), u1 ) + this.mapFaceUV( up.getFrontOffsetZ(), v1 );
double maxX = ( forward.getFrontOffsetX() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetX(), u2 ) + this.mapFaceUV( up.getFrontOffsetX(), v2 );
double maxY = ( forward.getFrontOffsetY() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetY(), u2 ) + this.mapFaceUV( up.getFrontOffsetY(), v2 );
double maxZ = ( forward.getFrontOffsetZ() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetZ(), u2 ) + this.mapFaceUV( up.getFrontOffsetZ(), v2 );
final double maxX = ( forward.getFrontOffsetX() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetX(), u2 ) + this.mapFaceUV( up.getFrontOffsetX(), v2 );
final double maxY = ( forward.getFrontOffsetY() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetY(), u2 ) + this.mapFaceUV( up.getFrontOffsetY(), v2 );
final double maxZ = ( forward.getFrontOffsetZ() > 0 ? 1 : 0 ) + this.mapFaceUV( west.getFrontOffsetZ(), u2 ) + this.mapFaceUV( up.getFrontOffsetZ(), v2 );
renderer.renderMinX = Math.max( 0.0, Math.min( minX, maxX ) - ( forward.getFrontOffsetX() != 0 ? 0 : 0.001 ) );
renderer.renderMaxX = Math.min( 1.0, Math.max( minX, maxX ) + ( forward.getFrontOffsetX() != 0 ? 0 : 0.001 ) );
@@ -652,7 +652,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
renderer.renderMaxZ = Math.min( 1.0, Math.max( minZ, maxZ ) + ( forward.getFrontOffsetZ() != 0 ? 0 : 0.001 ) );
}
private double mapFaceUV( int offset, int uv )
private double mapFaceUV( final int offset, final int uv )
{
if( offset == 0 )
{
@@ -667,13 +667,13 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ( 16.0 - uv ) / 16.0;
}
public void renderTile( B block, T tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderTile( final B block, final T tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
renderer.uvRotateBottom = renderer.uvRotateTop = renderer.uvRotateEast = renderer.uvRotateWest = renderer.uvRotateNorth = renderer.uvRotateSouth = 0;
AEPartLocation up = AEPartLocation.UP;
AEPartLocation forward = AEPartLocation.SOUTH;
final AEPartLocation up = AEPartLocation.UP;
final AEPartLocation forward = AEPartLocation.SOUTH;
this.applyTESRRotation( x, y, z, forward.getFacing(), up.getFacing() );
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
@@ -690,7 +690,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
BlockPos pos = tile.getPos();
final BlockPos pos = tile.getPos();
renderer.setTranslation( -pos.getX(), -pos.getY(), -pos.getZ() );
// note that this is a terrible approach...
@@ -703,11 +703,11 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
renderer.uvRotateBottom = renderer.uvRotateTop = renderer.uvRotateEast = renderer.uvRotateWest = renderer.uvRotateNorth = renderer.uvRotateSouth = 0;
}
protected void applyTESRRotation( double x, double y, double z, EnumFacing forward, EnumFacing up )
protected void applyTESRRotation( final double x, final double y, final double z, final EnumFacing forward, final EnumFacing up )
{
if( forward != null && up != null )
{
EnumFacing west = Platform.crossProduct( forward, up );
final EnumFacing west = Platform.crossProduct( forward, up );
this.rotMat.put( 0, west.getFrontOffsetX() );
this.rotMat.put( 1, west.getFrontOffsetY() );
@@ -738,11 +738,11 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
}
public void doRenderItem( ItemStack itemstack, TileEntity par1EntityItemFrame )
public void doRenderItem( final ItemStack itemstack, final TileEntity par1EntityItemFrame )
{
if( itemstack != null )
{
EntityItem entityitem = new EntityItem( par1EntityItemFrame.getWorld(), 0.0D, 0.0D, 0.0D, itemstack );
final EntityItem entityitem = new EntityItem( par1EntityItemFrame.getWorld(), 0.0D, 0.0D, 0.0D, itemstack );
entityitem.getEntityItem().stackSize = 1;
// set all this stuff and then do shit? meh?
@@ -43,12 +43,12 @@ public class BlockRenderInfo
private FlippableIcon eastIcon = null;
private FlippableIcon westIcon = null;
public BlockRenderInfo( BaseBlockRender inst )
public BlockRenderInfo( final BaseBlockRender inst )
{
this.rendererInstance = inst;
}
public void updateIcons( FlippableIcon bottom, FlippableIcon top, FlippableIcon north, FlippableIcon south, FlippableIcon east, FlippableIcon west )
public void updateIcons( final FlippableIcon bottom, final FlippableIcon top, final FlippableIcon north, final FlippableIcon south, final FlippableIcon east, final FlippableIcon west )
{
this.topIcon = top;
this.bottomIcon = bottom;
@@ -58,7 +58,7 @@ public class BlockRenderInfo
this.westIcon = west;
}
public void setTemporaryRenderIcon( IAESprite icon )
public void setTemporaryRenderIcon( final IAESprite icon )
{
if( icon == null )
{
@@ -76,7 +76,7 @@ public class BlockRenderInfo
}
}
public void setTemporaryRenderIcons( IAESprite nTopIcon, IAESprite nBottomIcon, IAESprite nSouthIcon, IAESprite nNorthIcon, IAESprite nEastIcon, IAESprite nWestIcon )
public void setTemporaryRenderIcons( final IAESprite nTopIcon, final IAESprite nBottomIcon, final IAESprite nSouthIcon, final IAESprite nNorthIcon, final IAESprite nEastIcon, final IAESprite nWestIcon )
{
this.tmpTopIcon.setOriginal( nTopIcon == null ? this.getTexture( AEPartLocation.UP ) : nTopIcon );
this.tmpBottomIcon.setOriginal( nBottomIcon == null ? this.getTexture( AEPartLocation.DOWN ) : nBottomIcon );
@@ -87,7 +87,7 @@ public class BlockRenderInfo
this.useTmp = true;
}
public FlippableIcon getTexture( AEPartLocation dir )
public FlippableIcon getTexture( final AEPartLocation dir )
{
if( this.useTmp )
{
@@ -95,14 +95,14 @@ public final class BusRenderHelper implements IPartRenderHelper
return this.itemsRendered;
}
public void setPass( int pass )
public void setPass( final int pass )
{
this.renderingForPass = 0;
this.currentPass = pass;
this.itemsRendered = 0;
}
public double getBound( AEPartLocation side )
public double getBound( final AEPartLocation side )
{
switch( side )
{
@@ -135,7 +135,7 @@ public final class BusRenderHelper implements IPartRenderHelper
}
*/
public void setOrientation( EnumFacing dx, EnumFacing dy, EnumFacing dz )
public void setOrientation( final EnumFacing dx, final EnumFacing dy, final EnumFacing dz )
{
this.ax = dx == null ? EnumFacing.EAST : dx;
this.ay = dy == null ? EnumFacing.UP : dy;
@@ -147,7 +147,7 @@ public final class BusRenderHelper implements IPartRenderHelper
return new double[] { this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ };
}
public void setBounds( double[] bounds )
public void setBounds( final double[] bounds )
{
if( bounds == null || bounds.length != 6 )
{
@@ -175,13 +175,13 @@ public final class BusRenderHelper implements IPartRenderHelper
private float maxY;
private float maxZ;
public BoundBoxCalculator( BusRenderHelper helper )
public BoundBoxCalculator( final BusRenderHelper helper )
{
this.helper = helper;
}
@Override
public void addBox( double minX, double minY, double minZ, double maxX, double maxY, double maxZ )
public void addBox( final double minX, final double minY, final double minZ, final double maxX, final double maxY, final double maxZ )
{
if( this.started )
{
@@ -233,7 +233,7 @@ public final class BusRenderHelper implements IPartRenderHelper
{
@Nullable
@Override
public AEBaseBlock apply( Block input )
public AEBaseBlock apply( final Block input )
{
if( input instanceof AEBaseBlock )
{
@@ -245,7 +245,7 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void renderForPass( int pass )
public void renderForPass( final int pass )
{
this.renderingForPass = pass;
}
@@ -261,7 +261,7 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void setBounds( float minX, float minY, float minZ, float maxX, float maxY, float maxZ )
public void setBounds( final float minX, final float minY, final float minZ, final float maxX, final float maxY, final float maxZ )
{
this.minX = minX;
this.minY = minY;
@@ -272,24 +272,24 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void setInvColor( int newColor )
public void setInvColor( final int newColor )
{
this.color = newColor;
}
@Override
public void setTexture( IAESprite ico )
public void setTexture( final IAESprite ico )
{
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
baseBlock.getRendererInstance().setTemporaryRenderIcon( ico );
}
}
@Override
public void setTexture( IAESprite down, IAESprite up, IAESprite north, IAESprite south, IAESprite west, IAESprite east )
public void setTexture( final IAESprite down, final IAESprite up, final IAESprite north, final IAESprite south, final IAESprite west, final IAESprite east )
{
IAESprite[] list = new IAESprite[6];
final IAESprite[] list = new IAESprite[6];
list[0] = down;
list[1] = up;
@@ -298,28 +298,28 @@ public final class BusRenderHelper implements IPartRenderHelper
list[4] = west;
list[5] = east;
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
baseBlock.getRendererInstance().setTemporaryRenderIcons( list[this.mapRotation( EnumFacing.UP ).ordinal()], list[this.mapRotation( EnumFacing.DOWN ).ordinal()], list[this.mapRotation( EnumFacing.SOUTH ).ordinal()], list[this.mapRotation( EnumFacing.NORTH ).ordinal()], list[this.mapRotation( EnumFacing.EAST ).ordinal()], list[this.mapRotation( EnumFacing.WEST ).ordinal()] );
}
}
public EnumFacing mapRotation( EnumFacing dir )
public EnumFacing mapRotation( final EnumFacing dir )
{
EnumFacing forward = this.az;
EnumFacing up = this.ay;
final EnumFacing forward = this.az;
final EnumFacing up = this.ay;
if( forward == null || up == null )
{
return dir;
}
int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
final int west_x = forward.getFrontOffsetY() * up.getFrontOffsetZ() - forward.getFrontOffsetZ() * up.getFrontOffsetY();
final int west_y = forward.getFrontOffsetZ() * up.getFrontOffsetX() - forward.getFrontOffsetX() * up.getFrontOffsetZ();
final int west_z = forward.getFrontOffsetX() * up.getFrontOffsetY() - forward.getFrontOffsetY() * up.getFrontOffsetX();
EnumFacing west = null;
for( EnumFacing dx : EnumFacing.VALUES )
for( final EnumFacing dx : EnumFacing.VALUES )
{
if( dx.getFrontOffsetX() == west_x && dx.getFrontOffsetY() == west_y && dx.getFrontOffsetZ() == west_z )
{
@@ -358,43 +358,43 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void renderInventoryBox( ModelGenerator renderer )
public void renderInventoryBox( final ModelGenerator renderer )
{
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
this.bbr.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), baseBlock, null, this.color, renderer );
}
}
@Override
public void renderInventoryFace( IAESprite icon, EnumFacing face, ModelGenerator renderer )
public void renderInventoryFace( final IAESprite icon, final EnumFacing face, final ModelGenerator renderer )
{
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
this.setTexture( icon );
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
this.bbr.renderInvBlock( EnumSet.of( AEPartLocation.fromFacing( face ) ), baseBlock, null, this.color, renderer );
}
}
@Override
public void renderBlock( BlockPos pos, ModelGenerator renderer )
public void renderBlock( final BlockPos pos, final ModelGenerator renderer )
{
if( !this.renderThis() )
{
return;
}
for( Block multiPart : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
for( final Block multiPart : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
{
final AEBaseBlock block = (AEBaseBlock) multiPart;
BlockRenderInfo info = block.getRendererInstance();
EnumFacing forward = BusRenderHelper.INSTANCE.az;
EnumFacing up = BusRenderHelper.INSTANCE.ay;
final BlockRenderInfo info = block.getRendererInstance();
final EnumFacing forward = BusRenderHelper.INSTANCE.az;
final EnumFacing up = BusRenderHelper.INSTANCE.ay;
renderer.uvRotateBottom = info.getTexture( AEPartLocation.DOWN ).setFlip( BaseBlockRender.getOrientation( EnumFacing.DOWN, forward, up ) );
renderer.uvRotateTop = info.getTexture( AEPartLocation.UP ).setFlip( BaseBlockRender.getOrientation( EnumFacing.UP, forward, up ) );
@@ -414,7 +414,7 @@ public final class BusRenderHelper implements IPartRenderHelper
@Override
public Block getBlock()
{
for( Block block : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
for( final Block block : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
{
return block;
}
@@ -422,33 +422,33 @@ public final class BusRenderHelper implements IPartRenderHelper
throw new MissingDefinition( "Tried to access the multi part block without it being defined." );
}
public void prepareBounds( ModelGenerator renderer )
public void prepareBounds( final ModelGenerator renderer )
{
this.bbr.renderBlockBounds( renderer, this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, this.ax, this.ay, this.az );
}
@Override
public void setFacesToRender( EnumSet<EnumFacing> faces )
public void setFacesToRender( final EnumSet<EnumFacing> faces )
{
BusRenderer.INSTANCE.renderer.renderFaces = faces;
}
@Override
public void renderBlockCurrentBounds( BlockPos pos, ModelGenerator renderer )
public void renderBlockCurrentBounds( final BlockPos pos, final ModelGenerator renderer )
{
if( !this.renderThis() )
{
return;
}
for( Block block : this.maybeBlock.asSet() )
for( final Block block : this.maybeBlock.asSet() )
{
renderer.renderStandardBlock( block, pos );
}
}
@Override
public void renderFaceCutout( BlockPos pos, IAESprite ico, EnumFacing face, float edgeThickness, ModelGenerator renderer )
public void renderFaceCutout( final BlockPos pos, final IAESprite ico, EnumFacing face, final float edgeThickness, final ModelGenerator renderer )
{
if( !this.renderThis() )
{
@@ -479,14 +479,14 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock block : this.maybeBaseBlock.asSet() )
{
this.bbr.renderCutoutFace( block, ico, pos, renderer, face, edgeThickness );
}
}
@Override
public void renderFace( BlockPos pos, IAESprite ico, EnumFacing face, ModelGenerator renderer )
public void renderFace( final BlockPos pos, final IAESprite ico, EnumFacing face, final ModelGenerator renderer )
{
if( !this.renderThis() )
{
@@ -518,7 +518,7 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
for( final AEBaseBlock block : this.maybeBaseBlock.asSet() )
{
this.bbr.renderFace( pos, block, ico, renderer, face );
}
@@ -53,19 +53,19 @@ public class BusRenderer implements IItemRenderer
public ModelGenerator renderer;
@Override
public boolean handleRenderType( ItemStack item, ItemRenderType type )
public boolean handleRenderType( final ItemStack item, final ItemRenderType type )
{
return true;
}
@Override
public boolean shouldUseRenderHelper( ItemRenderType type, ItemStack item, ItemRendererHelper helper )
public boolean shouldUseRenderHelper( final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper )
{
return true;
}
@Override
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
if( item == null )
{
@@ -128,8 +128,8 @@ public class BusRenderer implements IItemRenderer
if( item.getItem() instanceof IFacadeItem )
{
IFacadeItem fi = (IFacadeItem) item.getItem();
IFacadePart fp = fi.createPartFromItemStack( item, AEPartLocation.SOUTH );
final IFacadeItem fi = (IFacadeItem) item.getItem();
final IFacadePart fp = fi.createPartFromItemStack( item, AEPartLocation.SOUTH );
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
{
@@ -144,12 +144,12 @@ public class BusRenderer implements IItemRenderer
}
else
{
IPart ip = this.getRenderer( item, (IPartItem) item.getItem() );
final IPart ip = this.getRenderer( item, (IPartItem) item.getItem() );
if( ip != null )
{
if( type == ItemRenderType.ENTITY )
{
int depth = ip.cableConnectionRenderTo();
final int depth = ip.cableConnectionRenderTo();
GL11.glTranslatef( 0.0f, 0.0f, -0.04f * ( 8 - depth ) - 0.06f );
}
@@ -164,9 +164,9 @@ public class BusRenderer implements IItemRenderer
}
@Nullable
public IPart getRenderer( ItemStack is, IPartItem c )
public IPart getRenderer( final ItemStack is, final IPartItem c )
{
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
final int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
IPart part = RENDER_PART.get( id );
if( part == null )
@@ -47,10 +47,10 @@ public class CableRenderHelper
return INSTANCE;
}
public void renderStatic( CableBusContainer cableBusContainer, IFacadeContainer iFacadeContainer )
public void renderStatic( final CableBusContainer cableBusContainer, final IFacadeContainer iFacadeContainer )
{
TileEntity te = cableBusContainer.getTile();
ModelGenerator renderer = BusRenderer.INSTANCE.renderer;
final TileEntity te = cableBusContainer.getTile();
final ModelGenerator renderer = BusRenderer.INSTANCE.renderer;
if( renderer.overrideBlockTexture != null )
{
@@ -66,9 +66,9 @@ public class CableRenderHelper
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
}
for( AEPartLocation s : AEPartLocation.values() )
for( final AEPartLocation s : AEPartLocation.values() )
{
IPart part = cableBusContainer.getPart( s );
final IPart part = cableBusContainer.getPart( s );
if( part != null )
{
this.setSide( s );
@@ -90,24 +90,24 @@ public class CableRenderHelper
/**
* snag list of boxes...
*/
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
for( AEPartLocation s : AEPartLocation.values() )
final List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
for( final AEPartLocation s : AEPartLocation.values() )
{
IPart part = cableBusContainer.getPart( s );
final IPart part = cableBusContainer.getPart( s );
if( part != null )
{
this.setSide( s );
BusRenderHelper brh = BusRenderHelper.INSTANCE;
BusCollisionHelper bch = new BusCollisionHelper( boxes, brh.getWorldX(), brh.getWorldY(), brh.getWorldZ(), null, true );
final BusRenderHelper brh = BusRenderHelper.INSTANCE;
final BusCollisionHelper bch = new BusCollisionHelper( boxes, brh.getWorldX(), brh.getWorldY(), brh.getWorldZ(), null, true );
part.getBoxes( bch );
}
}
boolean useThinFacades = false;
double min = 2.0 / 16.0;
double max = 14.0 / 16.0;
final double min = 2.0 / 16.0;
final double max = 14.0 / 16.0;
for( AxisAlignedBB bb : boxes )
for( final AxisAlignedBB bb : boxes )
{
int o = 0;
o += bb.maxX > max ? 1 : 0;
@@ -123,15 +123,15 @@ public class CableRenderHelper
}
}
for( AEPartLocation s : AEPartLocation.SIDE_LOCATIONS )
for( final AEPartLocation s : AEPartLocation.SIDE_LOCATIONS )
{
IFacadePart fPart = iFacadeContainer.getFacade( s );
final IFacadePart fPart = iFacadeContainer.getFacade( s );
if( fPart != null )
{
fPart.setThinFacades( useThinFacades );
AxisAlignedBB pb = fPart.getPrimaryBox();
final AxisAlignedBB pb = fPart.getPrimaryBox();
AEAxisAlignedBB b = null;
for( AxisAlignedBB bb : boxes )
for( final AxisAlignedBB bb : boxes )
{
if( bb.intersectsWith( pb ) )
{
@@ -167,11 +167,11 @@ public class CableRenderHelper
}
}
private void setSide( AEPartLocation s )
private void setSide( final AEPartLocation s )
{
EnumFacing ax;
EnumFacing ay;
EnumFacing az;
final EnumFacing ax;
final EnumFacing ay;
final EnumFacing az;
switch( s )
{
@@ -215,16 +215,16 @@ public class CableRenderHelper
BusRenderHelper.INSTANCE.setOrientation( ax, ay, az );
}
public void renderDynamic( CableBusContainer cableBusContainer, double x, double y, double z )
public void renderDynamic( final CableBusContainer cableBusContainer, final double x, final double y, final double z )
{
for( EnumFacing s : EnumFacing.values() )
for( final EnumFacing s : EnumFacing.values() )
{
IPart part = cableBusContainer.getPart( s );
final IPart part = cableBusContainer.getPart( s );
if( part != null )
{
EnumFacing ax;
EnumFacing ay;
EnumFacing az;
final EnumFacing ax;
final EnumFacing ay;
final EnumFacing az;
switch( s )
{
@@ -17,7 +17,7 @@ public class IconUnwrapper extends TextureAtlasSprite
float max_v;
protected IconUnwrapper(
IAESprite src )
final IAESprite src )
{
super( src.getIconName() );
width = src.getIconWidth();
@@ -71,16 +71,16 @@ public class IconUnwrapper extends TextureAtlasSprite
}
@Override
public float getInterpolatedU(double d)
public float getInterpolatedU( final double d)
{
float f = this.max_u - this.min_u;
final float f = this.max_u - this.min_u;
return this.min_u + f * (float)d / 16.0F;
}
@Override
public float getInterpolatedV(double d)
public float getInterpolatedV( final double d)
{
float f = this.max_v - this.min_v;
final float f = this.max_v - this.min_v;
return this.min_v + f * ((float)d / 16.0F);
}
@@ -43,7 +43,7 @@ public class ModelGenerator
public CachedModel()
{
general = new ArrayList<BakedQuad>();
for ( EnumFacing f : EnumFacing.VALUES )
for ( final EnumFacing f : EnumFacing.VALUES )
faces[f.ordinal()] = new ArrayList<BakedQuad>();
}
@@ -85,7 +85,7 @@ public class ModelGenerator
@Override
public List getFaceQuads(
EnumFacing p_177551_1_ )
final EnumFacing p_177551_1_ )
{
return faces[p_177551_1_.ordinal()];
}
@@ -120,7 +120,7 @@ public class ModelGenerator
final float[] defUVs = new float[] { 0, 0, 1, 1 };
public void setRenderBoundsFromBlock(
Block block )
final Block block )
{
if ( block == null ) return;
@@ -133,12 +133,12 @@ public class ModelGenerator
}
public void setRenderBounds(
double d,
double e,
double f,
double g,
double h,
double i )
final double d,
final double e,
final double f,
final double g,
final double h,
final double i )
{
renderMinX = d;
renderMinY = e;
@@ -151,18 +151,18 @@ public class ModelGenerator
int color = -1;
public void setBrightness(
int i )
final int i )
{
brightness=i;
}
public void setColorRGBA_F(
int r,
int g,
int b,
float a )
final int r,
final int g,
final int b,
final float a )
{
int alpha = ( int ) ( a * 0xff );
final int alpha = ( int ) ( a * 0xff );
color = alpha << 24 |
r << 16 |
b << 8 |
@@ -170,18 +170,18 @@ public class ModelGenerator
}
public void setColorOpaque_I(
int whiteVariant )
final int whiteVariant )
{
int alpha = 0xff;
final int alpha = 0xff;
color = //alpha << 24 |
whiteVariant;
}
public void setColorOpaque(
int r,
int g,
int b )
final int r,
final int g,
final int b )
{
int alpha = 0xff;
final int alpha = 0xff;
color =// alpha << 24 |
r << 16 |
g << 8 |
@@ -189,11 +189,11 @@ public class ModelGenerator
}
public void setColorOpaque_F(
int r,
int g,
int b )
final int r,
final int g,
final int b )
{
int alpha = 0xff;
final int alpha = 0xff;
color = //alpha << 24 |
Math.min( 0xff, Math.max( 0, r ) ) << 16 |
Math.min( 0xff, Math.max( 0, g ) ) << 8 |
@@ -201,14 +201,14 @@ public class ModelGenerator
}
public void setColorOpaque_F(
float rf,
float bf,
float gf )
final float rf,
final float bf,
final float gf )
{
int r = (int)( rf * 0xff );
int g = (int)( gf * 0xff );
int b = (int)( bf * 0xff );
int alpha = 0xff;
final int r = (int)( rf * 0xff );
final int g = (int)( gf * 0xff );
final int b = (int)( bf * 0xff );
final int alpha = 0xff;
color = //alpha << 24 |
Math.min( 0xff, Math.max( 0, r ) ) << 16 |
Math.min( 0xff, Math.max( 0, g ) ) << 8 |
@@ -216,21 +216,21 @@ public class ModelGenerator
}
public IAESprite getIcon(
ItemStack is )
final ItemStack is )
{
Item it = is.getItem();
final Item it = is.getItem();
if ( it instanceof ItemMultiPart )
return ( (ItemMultiPart) it).getIcon( is);
Block blk = Block.getBlockFromItem( it );
final Block blk = Block.getBlockFromItem( it );
if ( blk != null )
return getIcon(blk.getStateFromMeta( is.getMetadata() ))[0];
if ( it instanceof AEBaseItem )
{
IAESprite ico = ( (AEBaseItem)it ).getIcon(is);
final IAESprite ico = ( (AEBaseItem)it ).getIcon(is);
if ( ico != null ) return ico;
}
@@ -239,20 +239,20 @@ public class ModelGenerator
public IAESprite[] getIcon(
IBlockState state )
final IBlockState state )
{
IAESprite[] out = new IAESprite[6];
final IAESprite[] out = new IAESprite[6];
Block blk = state.getBlock();
final Block blk = state.getBlock();
if ( blk instanceof AEBaseBlock )
{
AEBaseBlock base = (AEBaseBlock)blk;
for ( EnumFacing face : EnumFacing.VALUES )
final AEBaseBlock base = (AEBaseBlock)blk;
for ( final EnumFacing face : EnumFacing.VALUES )
out[face.ordinal()] = base.getIcon( face, state );
}
else
{
TextureAtlasSprite spite = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( state );
final TextureAtlasSprite spite = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( state );
if ( spite == null )
{
out[0] = new MissingIcon( blk );
@@ -264,7 +264,7 @@ public class ModelGenerator
}
else
{
IAESprite mySpite = new BaseIcon( spite );
final IAESprite mySpite = new BaseIcon( spite );
out[0] = mySpite;
out[1] = mySpite;
out[2] = mySpite;
@@ -277,17 +277,17 @@ public class ModelGenerator
return out;
}
public IAESprite[] getIcon( IBlockAccess world, BlockPos pos)
public IAESprite[] getIcon( final IBlockAccess world, final BlockPos pos)
{
IBlockState state = world.getBlockState( pos );
Block blk = state.getBlock();
final IBlockState state = world.getBlockState( pos );
final Block blk = state.getBlock();
if ( blk instanceof AEBaseBlock )
{
IAESprite[] out = new IAESprite[6];
final IAESprite[] out = new IAESprite[6];
AEBaseBlock base = (AEBaseBlock)blk;
for ( EnumFacing face : EnumFacing.VALUES )
final AEBaseBlock base = (AEBaseBlock)blk;
for ( final EnumFacing face : EnumFacing.VALUES )
out[face.ordinal()] = base.getIcon( world, pos, face );
return out;
@@ -301,19 +301,19 @@ public class ModelGenerator
float[][] points = new float[4][];
public void addVertexWithUV(
EnumFacing face,
double x,
double y,
double z,
double u,
double v )
final EnumFacing face,
final double x,
final double y,
final double z,
final double u,
final double v )
{
points[point++] = new float[]{ (float)x+tx, (float)y+ty, (float)z+tz, (float)u, (float)v };
if ( point == 4 )
{
brightness = -1;
int[] vertData = new int[]{
final int[] vertData = new int[]{
Float.floatToRawIntBits( points[0][0] ),
Float.floatToRawIntBits( points[0][1] ),
Float.floatToRawIntBits( points[0][2] ),
@@ -354,12 +354,12 @@ public class ModelGenerator
}
public boolean renderStandardBlock(
Block block,
BlockPos pos )
final Block block,
final BlockPos pos )
{
//setRenderBoundsFromBlock( block );
IAESprite[] textures = getIcon( blockAccess,pos );
final IAESprite[] textures = getIcon( blockAccess,pos );
setColorOpaque_I( 0xffffff );
renderFaceXNeg( block, pos, textures[EnumFacing.WEST.ordinal()] );
@@ -373,9 +373,9 @@ public class ModelGenerator
}
public void setTranslation(
int x,
int y,
int z )
final int x,
final int y,
final int z )
{
tx=x;
ty=y;
@@ -466,88 +466,88 @@ public class ModelGenerator
}
public void renderFaceXNeg(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMinX < 0.0001;
Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ * 16.0f);
Vector3f from = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final boolean isEdge = renderMinX < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ * 16.0f);
final Vector3f from = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final EnumFacing myFace = EnumFacing.WEST;
addFace(myFace, isEdge,to,from,defUVs,lights );
}
public void renderFaceYNeg(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMinY < 0.0001;
Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = renderMinY < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
final EnumFacing myFace = EnumFacing.DOWN;
addFace(myFace, isEdge,to,from,defUVs, lights );
}
public void renderFaceZNeg(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMinZ < 0.0001;
Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
final boolean isEdge = renderMinZ < 0.0001;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
final EnumFacing myFace = EnumFacing.NORTH;
addFace(myFace, isEdge,to,from,defUVs, lights );
}
public void renderFaceYPos(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMaxY > 0.9999;
Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final boolean isEdge = renderMaxY > 0.9999;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ * 16.0f);
final EnumFacing myFace = EnumFacing.UP;
addFace(myFace, isEdge,to,from,defUVs,lights );
}
public void renderFaceZPos(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMaxZ > 0.9999;
Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = renderMaxZ > 0.9999;
final Vector3f to = new Vector3f( (float)renderMinX* 16.0f, (float)renderMinY* 16.0f, (float)renderMaxZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final EnumFacing myFace = EnumFacing.SOUTH;
addFace(myFace, isEdge,to,from,defUVs,lights );
}
public void renderFaceXPos(
Block blk,
BlockPos pos,
IAESprite lights )
final Block blk,
final BlockPos pos,
final IAESprite lights )
{
boolean isEdge = renderMaxX > 0.9999;
Vector3f to = new Vector3f( (float)renderMaxX * 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final boolean isEdge = renderMaxX > 0.9999;
final Vector3f to = new Vector3f( (float)renderMaxX * 16.0f, (float)renderMinY* 16.0f, (float)renderMinZ* 16.0f );
final Vector3f from = new Vector3f( (float)renderMaxX* 16.0f, (float)renderMaxY* 16.0f, (float)renderMaxZ* 16.0f );
final EnumFacing myFace = EnumFacing.EAST;
addFace(myFace, isEdge,to,from,defUVs, lights );
}
private void addFace(
EnumFacing face , boolean isEdge,
Vector3f to,
Vector3f from,
float[] defUVs2,
final EnumFacing face , final boolean isEdge,
final Vector3f to,
final Vector3f from,
final float[] defUVs2,
IAESprite texture )
{
if ( overrideBlockTexture != null )
@@ -559,9 +559,9 @@ public class ModelGenerator
EnumFacing currentFace = EnumFacing.UP;
public void setNormal(
float x,
float y,
float z )
final float x,
final float y,
final float z )
{
if ( x > 0.5 ) currentFace = EnumFacing.EAST;
if ( x < -0.5 ) currentFace = EnumFacing.WEST;
@@ -572,19 +572,19 @@ public class ModelGenerator
}
public void setOverrideBlockTexture(
IAESprite object )
final IAESprite object )
{
overrideBlockTexture = object;
}
public void finalizeModel( boolean Flip )
public void finalizeModel( final boolean Flip )
{
ModelRotation mr = ModelRotation.X0_Y0;
if ( Flip )
mr = ModelRotation.X0_Y180;
for ( SMFace face : faces )
for ( final SMFace face : faces )
{
final EnumFacing myFace = face.face;
final float[] uvs = getFaceUvs( myFace, face.from, face.to );
@@ -37,7 +37,7 @@ public class RenderBlocksWorkaround extends ModelGenerator
public float opacity;
public void setTexture(
Object object )
final Object object )
{
// TODO Auto-generated method stub
@@ -21,12 +21,12 @@ public class SMFace
public final int color;
public SMFace(
EnumFacing face , boolean isEdge,
int color,
Vector3f to,
Vector3f from,
float[] defUVs2,
TextureAtlasSprite iconUnwrapper )
final EnumFacing face , final boolean isEdge,
final int color,
final Vector3f to,
final Vector3f from,
final float[] defUVs2,
final TextureAtlasSprite iconUnwrapper )
{
this.color = color;
this.face=face;
@@ -53,9 +53,9 @@ public class SpatialSkyRender extends IRenderHandler
}
@Override
public void render( float partialTicks, WorldClient world, Minecraft mc )
public void render( final float partialTicks, final WorldClient world, final Minecraft mc )
{
long now = System.currentTimeMillis();
final long now = System.currentTimeMillis();
if( now - this.cycle > 2000 )
{
this.cycle = now;
@@ -75,8 +75,8 @@ public class SpatialSkyRender extends IRenderHandler
GL11.glDisable( GL11.GL_BLEND );
GL11.glDepthMask( false );
GL11.glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
for( int i = 0; i < 6; ++i )
{
@@ -144,8 +144,8 @@ public class SpatialSkyRender extends IRenderHandler
private void renderTwinkles()
{
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
final Tessellator tessellator = Tessellator.getInstance();
final WorldRenderer worldrenderer = tessellator.getWorldRenderer();
worldrenderer.startDrawingQuads();
for( int i = 0; i < 50; ++i )
@@ -153,7 +153,7 @@ public class SpatialSkyRender extends IRenderHandler
double iX = this.random.nextFloat() * 2.0F - 1.0F;
double iY = this.random.nextFloat() * 2.0F - 1.0F;
double iZ = this.random.nextFloat() * 2.0F - 1.0F;
double d3 = 0.05F + this.random.nextFloat() * 0.1F;
final double d3 = 0.05F + this.random.nextFloat() * 0.1F;
double dist = iX * iX + iY * iY + iZ * iZ;
if( dist < 1.0D && dist > 0.01D )
@@ -162,30 +162,30 @@ public class SpatialSkyRender extends IRenderHandler
iX *= dist;
iY *= dist;
iZ *= dist;
double x = iX * 100.0D;
double y = iY * 100.0D;
double z = iZ * 100.0D;
double d8 = Math.atan2( iX, iZ );
double d9 = Math.sin( d8 );
double d10 = Math.cos( d8 );
double d11 = Math.atan2( Math.sqrt( iX * iX + iZ * iZ ), iY );
double d12 = Math.sin( d11 );
double d13 = Math.cos( d11 );
double d14 = this.random.nextDouble() * Math.PI * 2.0D;
double d15 = Math.sin( d14 );
double d16 = Math.cos( d14 );
final double x = iX * 100.0D;
final double y = iY * 100.0D;
final double z = iZ * 100.0D;
final double d8 = Math.atan2( iX, iZ );
final double d9 = Math.sin( d8 );
final double d10 = Math.cos( d8 );
final double d11 = Math.atan2( Math.sqrt( iX * iX + iZ * iZ ), iY );
final double d12 = Math.sin( d11 );
final double d13 = Math.cos( d11 );
final double d14 = this.random.nextDouble() * Math.PI * 2.0D;
final double d15 = Math.sin( d14 );
final double d16 = Math.cos( d14 );
for( int j = 0; j < 4; ++j )
{
double d17 = 0.0D;
double d18 = ( ( j & 2 ) - 1 ) * d3;
double d19 = ( ( j + 1 & 2 ) - 1 ) * d3;
double d20 = d18 * d16 - d19 * d15;
double d21 = d19 * d16 + d18 * d15;
double d22 = d20 * d12 + d17 * d13;
double d23 = d17 * d12 - d20 * d13;
double d24 = d23 * d9 - d21 * d10;
double d25 = d21 * d9 + d23 * d10;
final double d17 = 0.0D;
final double d18 = ( ( j & 2 ) - 1 ) * d3;
final double d19 = ( ( j + 1 & 2 ) - 1 ) * d3;
final double d20 = d18 * d16 - d19 * d15;
final double d21 = d19 * d16 + d18 * d15;
final double d22 = d20 * d12 + d17 * d13;
final double d23 = d17 * d12 - d20 * d13;
final double d24 = d23 * d9 - d21 * d10;
final double d25 = d21 * d9 + d23 * d10;
worldrenderer.addVertex( x + d24, y + d22, z + d25 );
}
}
@@ -42,18 +42,18 @@ public class TESRWrapper extends TileEntitySpecialRenderer
private final BaseBlockRender blkRender;
private final double maxDistance;
public TESRWrapper( BaseBlockRender render )
public TESRWrapper( final BaseBlockRender render )
{
this.blkRender = render;
this.maxDistance = this.blkRender.getTesrRenderDistance();
}
@Override
public final void renderTileEntityAt( TileEntity te, double x, double y, double z, float f, int something )
public final void renderTileEntityAt( final TileEntity te, final double x, final double y, final double z, final float f, final int something )
{
if( te instanceof AEBaseTile )
{
Block b = te.getBlockType();
final Block b = te.getBlockType();
if( b instanceof AEBaseBlock && ( (AEBaseTile) te ).requiresTESR() )
{
@@ -62,7 +62,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
return;
}
Tessellator tess = Tessellator.getInstance();
final Tessellator tess = Tessellator.getInstance();
try
{
@@ -73,7 +73,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
GL11.glPopMatrix();
}
catch( Throwable t )
catch( final Throwable t )
{
AELog.severe( "Hi, Looks like there was a crash while rendering something..." );
t.printStackTrace();
@@ -45,36 +45,36 @@ public final class WorldRender implements ISimpleBlockRenderingHandler
{
}
void setRender( AEBaseBlock in, BaseBlockRender r )
void setRender( final AEBaseBlock in, final BaseBlockRender r )
{
this.blockRenders.put( in, r );
}
@Override
public void renderInventoryBlock( Block block, int metadata, int modelID, ModelGenerator renderer )
public void renderInventoryBlock( final Block block, final int metadata, final int modelID, final ModelGenerator renderer )
{
// wtf is this for?
}
@Override
public boolean renderWorldBlock( IBlockAccess world, BlockPos pos, Block block, int modelId, ModelGenerator renderer )
public boolean renderWorldBlock( final IBlockAccess world, final BlockPos pos, final Block block, final int modelId, final ModelGenerator renderer )
{
AEBaseBlock blk = (AEBaseBlock) block;
final AEBaseBlock blk = (AEBaseBlock) block;
renderer.setRenderBoundsFromBlock( block );
return this.getRender( blk ).renderInWorld( blk, world, pos, renderer );
}
private BaseBlockRender getRender( AEBaseBlock block )
private BaseBlockRender getRender( final AEBaseBlock block )
{
return block.getRendererInstance().rendererInstance;
}
public void renderItemBlock( ItemStack item, ItemRenderType type, Object[] data )
public void renderItemBlock( final ItemStack item, final ItemRenderType type, final Object[] data )
{
Block blk = Block.getBlockFromItem( item.getItem() );
final Block blk = Block.getBlockFromItem( item.getItem() );
if( blk instanceof AEBaseBlock )
{
AEBaseBlock block = (AEBaseBlock) blk;
final AEBaseBlock block = (AEBaseBlock) blk;
this.renderer.setRenderBoundsFromBlock( block );
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
@@ -55,7 +55,7 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
}
@Override
public void renderInventory( BlockMolecularAssembler blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockMolecularAssembler blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setOverrideBlockTexture( renderer.getIcon( blk.getStateFromMeta( is.getMetadata() ) )[0] );
@@ -102,16 +102,16 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
}
@Override
public boolean renderInWorld( BlockMolecularAssembler maBlock, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockMolecularAssembler maBlock, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileMolecularAssembler tma = maBlock.getTileEntity( world, pos );
final TileMolecularAssembler tma = maBlock.getTileEntity( world, pos );
if ( renderer.isAlphaPass() )
{
if( tma.isPowered() )
{
this.renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, EnumFacing.WEST, EnumFacing.UP, EnumFacing.SOUTH );
TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
final TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
renderer.setColorRGBA_F( 1, 1, 1, 0.3f );
renderer.setBrightness( 14 << 20 | 14 << 4 );
renderer.renderFaceXNeg( maBlock, pos, lights );
@@ -131,11 +131,11 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
this.preRenderInWorld( maBlock, world, pos, renderer );
IOrientable te = this.getOrientable( maBlock, world, pos );
final IOrientable te = this.getOrientable( maBlock, world, pos );
EnumFacing fdy = te.getUp();
EnumFacing fdz = te.getForward();
EnumFacing fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
final EnumFacing fdy = te.getUp();
final EnumFacing fdz = te.getForward();
final EnumFacing fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
renderer.renderAllFaces = true;
@@ -193,7 +193,7 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
return true;
}
public void renderCableAt( double thickness, IBlockAccess world, BlockPos pos, BlockMolecularAssembler block, ModelGenerator renderer, double pull, boolean covered )
public void renderCableAt( final double thickness, final IBlockAccess world, final BlockPos pos, final BlockMolecularAssembler block, final ModelGenerator renderer, final double pull, final boolean covered )
{
IAESprite texture = null;
@@ -242,19 +242,19 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
block.getRendererInstance().setTemporaryRenderIcon( null );
}
IAESprite getConnectedCable( IBlockAccess world, BlockPos pos, EnumFacing side, boolean covered,ModelGenerator renderer )
IAESprite getConnectedCable( final IBlockAccess world, final BlockPos pos, final EnumFacing side, final boolean covered, final ModelGenerator renderer )
{
final int tileYPos = pos.getY() + side.getFrontOffsetY();
if( -1 < tileYPos && tileYPos < 256 )
{
TileEntity ne = world.getTileEntity( pos.offset( side ) );
final TileEntity ne = world.getTileEntity( pos.offset( side ) );
if( ne instanceof IGridHost && ne instanceof IPartHost )
{
IPartHost ph = (IPartHost) ne;
IPart pcx = ph.getPart( AEPartLocation.INTERNAL );
final IPartHost ph = (IPartHost) ne;
final IPart pcx = ph.getPart( AEPartLocation.INTERNAL );
if( pcx instanceof PartCable )
{
PartCable pc = (PartCable) pcx;
final PartCable pc = (PartCable) pcx;
if( pc.isConnected( side.getOpposite() ) )
{
if( covered )
@@ -271,7 +271,7 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
}
@Override
public void getBoxes( IPartCollisionHelper bch )
public void getBoxes( final IPartCollisionHelper bch )
{
bch.addBox( 0, 0, 0, 16, 16, 16 );
}
@@ -54,7 +54,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
}
@Override
public void renderInventory( BlockCharger blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockCharger blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.renderAllFaces = true;
this.setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
@@ -83,7 +83,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
}
@Override
public boolean renderInWorld( BlockCharger block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockCharger block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
this.preRenderInWorld( block, world, pos, renderer );
@@ -123,7 +123,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
}
@Override
public void renderTile( BlockCharger block, TileCharger tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderTile( final BlockCharger block, final TileCharger tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
final ItemStack sis = tile.getStackInSlot( 0 );
@@ -163,7 +163,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
this.doRenderItem( sis, tile );
}
catch( Exception err )
catch( final Exception err )
{
AELog.error( err );
}
@@ -41,16 +41,16 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
}
@Override
public boolean renderInWorld( BlockController blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockController blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
boolean xx = this.getTileEntity( world, pos.offset( EnumFacing.WEST ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.EAST ) ) instanceof TileController;
boolean yy = this.getTileEntity( world, pos.offset( EnumFacing.DOWN ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.UP ) ) instanceof TileController;
boolean zz = this.getTileEntity( world, pos.offset( EnumFacing.SOUTH )) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.NORTH ) ) instanceof TileController;
final boolean xx = this.getTileEntity( world, pos.offset( EnumFacing.WEST ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.EAST ) ) instanceof TileController;
final boolean yy = this.getTileEntity( world, pos.offset( EnumFacing.DOWN ) ) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.UP ) ) instanceof TileController;
final boolean zz = this.getTileEntity( world, pos.offset( EnumFacing.SOUTH )) instanceof TileController && this.getTileEntity( world, pos.offset( EnumFacing.NORTH ) ) instanceof TileController;
BlockController.ControllerBlockState meta = ( ControllerBlockState ) world.getBlockState( pos ).getValue( BlockController.CONTROLLER_STATE );
boolean hasPower = meta != BlockController.ControllerBlockState.OFFLINE;
boolean isConflict = meta == BlockController.ControllerBlockState.CONFLICTED;
final BlockController.ControllerBlockState meta = ( ControllerBlockState ) world.getBlockState( pos ).getValue( BlockController.CONTROLLER_STATE );
final boolean hasPower = meta != BlockController.ControllerBlockState.OFFLINE;
final boolean isConflict = meta == BlockController.ControllerBlockState.CONFLICTED;
ExtraBlockTextures lights = null;
@@ -125,7 +125,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
}
else if( ( xx ? 1 : 0 ) + ( yy ? 1 : 0 ) + ( zz ? 1 : 0 ) >= 2 )
{
int v = ( Math.abs( pos.getX() ) + Math.abs( pos.getY() ) + Math.abs( pos.getZ() ) ) % 2;
final int v = ( Math.abs( pos.getX() ) + Math.abs( pos.getY() ) + Math.abs( pos.getZ() ) ) % 2;
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
if( v == 0 )
@@ -157,7 +157,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
}
}
boolean out = renderer.renderStandardBlock( blk, pos );
final boolean out = renderer.renderStandardBlock( blk, pos );
if( lights != null )
{
renderer.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
@@ -175,7 +175,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
return out;
}
private TileEntity getTileEntity( IBlockAccess world, BlockPos pos )
private TileEntity getTileEntity( final IBlockAccess world, final BlockPos pos )
{
if( pos.getY() >= 0 )
{
@@ -46,7 +46,7 @@ import appeng.tile.crafting.TileCraftingTile;
public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileCraftingTile> extends BaseBlockRender<B, T>
{
protected RenderBlockCraftingCPU( boolean useTESR, int range )
protected RenderBlockCraftingCPU( final boolean useTESR, final int range )
{
super( useTESR, range );
}
@@ -57,23 +57,23 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
@Override
public boolean renderInWorld( B blk, IBlockAccess w, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final B blk, final IBlockAccess w, final BlockPos pos, ModelGenerator renderer )
{
boolean formed = false;
boolean emitsLight = false;
TileCraftingTile ct = blk.getTileEntity( w, pos );
final TileCraftingTile ct = blk.getTileEntity( w, pos );
if( ct != null && ct.isFormed() )
{
formed = true;
emitsLight = ct.isPowered();
}
boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
IAESprite theIcon = renderer.getIcon( w.getBlockState( pos ) )[EnumFacing.SOUTH.ordinal()];
final boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
final IAESprite theIcon = renderer.getIcon( w.getBlockState( pos ) )[EnumFacing.SOUTH.ordinal()];
int meta = 1;
for( Block craftingBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
for( final Block craftingBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
{
if ( craftingBlock == blk )
meta = 0;
@@ -82,7 +82,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
IAESprite nonForward = theIcon;
if( isMonitor )
{
for( Block craftingBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
for( final Block craftingBlock : AEApi.instance().definitions().blocks().craftingUnit().maybeBlock().asSet() )
{
nonForward = renderer.getIcon( craftingBlock.getDefaultState() )[EnumFacing.SOUTH.ordinal()]; // craftingBlock.getIcon( 0, meta | ( formed ? 8 : 0 ) );
}
@@ -91,20 +91,20 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
if( formed && renderer.overrideBlockTexture == null )
{
renderer = BusRenderer.INSTANCE.renderer;
BusRenderHelper i = BusRenderHelper.INSTANCE;
final BusRenderHelper i = BusRenderHelper.INSTANCE;
renderer.blockAccess = w;
i.setPass( MinecraftForgeClient.getRenderLayer() == EnumWorldBlockLayer.TRANSLUCENT ? 1 : 0 );
i.setOrientation( EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
float highX = this.isConnected( w, pos, EnumFacing.EAST ) ? 16 : 13.01f;
float lowX = this.isConnected( w, pos, EnumFacing.WEST ) ? 0 : 2.99f;
final float highX = this.isConnected( w, pos, EnumFacing.EAST ) ? 16 : 13.01f;
final float lowX = this.isConnected( w, pos, EnumFacing.WEST ) ? 0 : 2.99f;
float highY = this.isConnected( w, pos, EnumFacing.UP ) ? 16 : 13.01f;
float lowY = this.isConnected( w, pos, EnumFacing.DOWN ) ? 0 : 2.99f;
final float highY = this.isConnected( w, pos, EnumFacing.UP ) ? 16 : 13.01f;
final float lowY = this.isConnected( w, pos, EnumFacing.DOWN ) ? 0 : 2.99f;
float highZ = this.isConnected( w, pos, EnumFacing.SOUTH ) ? 16 : 13.01f;
float lowZ = this.isConnected( w, pos, EnumFacing.NORTH ) ? 0 : 2.99f;
final float highZ = this.isConnected( w, pos, EnumFacing.SOUTH ) ? 16 : 13.01f;
final float lowZ = this.isConnected( w, pos, EnumFacing.NORTH ) ? 0 : 2.99f;
this.renderCorner( i, renderer, w, pos, EnumFacing.UP, EnumFacing.EAST, EnumFacing.NORTH );
this.renderCorner( i, renderer, w, pos, EnumFacing.UP, EnumFacing.EAST, EnumFacing.SOUTH );
@@ -115,7 +115,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
this.renderCorner( i, renderer, w, pos, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.NORTH );
this.renderCorner( i, renderer, w, pos, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.SOUTH );
for( EnumFacing side : EnumFacing.VALUES )
for( final EnumFacing side : EnumFacing.VALUES )
{
i.setBounds( this.fso( side, lowX, EnumFacing.WEST ), this.fso( side, lowY, EnumFacing.DOWN ), this.fso( side, lowZ, EnumFacing.NORTH ), this.fso( side, highX, EnumFacing.EAST ), this.fso( side, highY, EnumFacing.UP ), this.fso( side, highZ, EnumFacing.SOUTH ) );
i.prepareBounds( renderer );
@@ -136,15 +136,15 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
else
{
double a = 0.0 / 16.0;
double o = 16.0 / 16.0;
final double a = 0.0 / 16.0;
final double o = 16.0 / 16.0;
renderer.setRenderBounds( a, a, a, o, o, o );
return renderer.renderStandardBlock( blk, pos );
}
}
private boolean isConnected( IBlockAccess w, BlockPos pos, EnumFacing side )
private boolean isConnected( final IBlockAccess w, final BlockPos pos, final EnumFacing side )
{
final int tileYPos = pos.getY() + side.getFrontOffsetY();
if( 0 <= tileYPos && tileYPos <= 255 )
@@ -159,7 +159,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
}
private void renderCorner( BusRenderHelper i, ModelGenerator renderer, IBlockAccess w, BlockPos pos, EnumFacing up, EnumFacing east, EnumFacing south )
private void renderCorner( final BusRenderHelper i, final ModelGenerator renderer, final IBlockAccess w, final BlockPos pos, final EnumFacing up, final EnumFacing east, final EnumFacing south )
{
if( this.isConnected( w, pos, up ) )
{
@@ -180,7 +180,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
i.renderBlockCurrentBounds( pos, renderer );
}
private float fso( EnumFacing side, float def, EnumFacing target )
private float fso( final EnumFacing side, final float def, final EnumFacing target )
{
if( side == target )
{
@@ -193,7 +193,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
return def;
}
private void handleSide( B blk, int meta, BlockPos pos, BusRenderHelper i, ModelGenerator renderer, IAESprite color, boolean emitsLight, boolean isMonitor, EnumFacing side, IBlockAccess w )
private void handleSide( final B blk, final int meta, final BlockPos pos, final BusRenderHelper i, final ModelGenerator renderer, final IAESprite color, final boolean emitsLight, final boolean isMonitor, final EnumFacing side, final IBlockAccess w )
{
if( this.isConnected( w, pos, side ) )
{
@@ -228,10 +228,10 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
{
if( color == ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon() )
{
int b = w.getCombinedLight( pos.offset( side ), 0 );
final int b = w.getCombinedLight( pos.offset( side ), 0 );
TileCraftingMonitorTile sr = blk.getTileEntity( w, pos );
AEColor col = sr.getColor();
final TileCraftingMonitorTile sr = blk.getTileEntity( w, pos );
final AEColor col = sr.getColor();
renderer.setBrightness( b );
renderer.setColorOpaque_I( col.whiteVariant );
@@ -252,8 +252,8 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
{
if( isMonitor )
{
TileCraftingMonitorTile sr = blk.getTileEntity( w, pos );
AEColor col = sr.getColor();
final TileCraftingMonitorTile sr = blk.getTileEntity( w, pos );
final AEColor col = sr.getColor();
renderer.setColorOpaque_I( col.whiteVariant );
renderer.setBrightness( 13 << 20 | 13 << 4 );
@@ -269,7 +269,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
else
{
AEPartLocation aeDir = AEPartLocation.fromFacing( side );
final AEPartLocation aeDir = AEPartLocation.fromFacing( side );
renderer.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
renderer.setBrightness( 13 << 20 | 13 << 4 );
i.renderFace( pos, color, side, renderer );
@@ -278,7 +278,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
}
for( EnumFacing a : EnumFacing.VALUES )
for( final EnumFacing a : EnumFacing.VALUES )
{
if( a == side || a == side.getOpposite() )
{
@@ -298,10 +298,10 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRingLong.getIcon() );
}
AEPartLocation dir = AEPartLocation.fromFacing( a );
final AEPartLocation dir = AEPartLocation.fromFacing( a );
if( !( i.getBound( dir ) < 0.001 || i.getBound( dir ) > 15.999 ) )
{
double width = 3.0 / 16.0;
final double width = 3.0 / 16.0;
switch( a )
{
case DOWN:
@@ -350,7 +350,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
}
}
private float gso( EnumFacing side, float def, EnumFacing target )
private float gso( final EnumFacing side, final float def, final EnumFacing target )
{
if( side != target )
{
@@ -57,7 +57,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
}
@Override
public void renderTile( BlockCraftingMonitor block, TileCraftingMonitorTile tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( tile != null )
{
@@ -91,9 +91,9 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
}
}
private void tesrRenderScreen( WorldRenderer tess, TileCraftingMonitorTile cmt, IAEItemStack ais )
private void tesrRenderScreen( final WorldRenderer tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
{
EnumFacing side = cmt.getForward();
final EnumFacing side = cmt.getForward();
EnumFacing walrus = side.getFrontOffsetY() != 0 ? EnumFacing.SOUTH : EnumFacing.UP;
int spin = 0;
@@ -110,7 +110,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
GL11.glTranslated( side.getFrontOffsetX() * 0.69, side.getFrontOffsetY() * 0.69, side.getFrontOffsetZ() * 0.69 );
float scale = 0.7f;
final float scale = 0.7f;
GL11.glScalef( scale, scale, scale );
if( side == EnumFacing.UP )
@@ -153,12 +153,12 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
GL11.glPushMatrix();
try
{
ItemStack sis = ais.getItemStack();
final ItemStack sis = ais.getItemStack();
sis.stackSize = 1;
int br = 16 << 20 | 16 << 4;
int var11 = br % 65536;
int var12 = br / 65536;
final int br = 16 << 20 | 16 << 4;
final int var11 = br % 65536;
final int var12 = br / 65536;
OpenGlHelper.setLightmapTextureCoords( OpenGlHelper.lightmapTexUnit, var11 * 0.8F, var12 * 0.8F );
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
@@ -170,7 +170,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
ClientHelper.proxy.doRenderItem( sis, cmt.getWorld() );
}
catch( Exception e )
catch( final Exception e )
{
AELog.error( e );
}
@@ -183,8 +183,8 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
final long stackSize = ais.getStackSize();
final String renderedStackSize = NUMBER_CONVERTER.toWideReadableForm( stackSize );
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
int width = fr.getStringWidth( renderedStackSize );
final FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
final int width = fr.getStringWidth( renderedStackSize );
GL11.glTranslatef( -0.5f * width, 0.0f, -1.0f );
fr.drawString( renderedStackSize, 0, 0, 0 );
@@ -47,7 +47,7 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
}
@Override
public void renderInventory( BlockCrank blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockCrank blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.renderAllFaces = true;
@@ -61,13 +61,13 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
}
@Override
public boolean renderInWorld( BlockCrank imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockCrank imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
return true;
}
@Override
public void renderTile( BlockCrank blk, TileCrank tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderBlocks )
public void renderTile( final BlockCrank blk, final TileCrank tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderBlocks )
{
if( tile.getUp() == null )
{
@@ -97,11 +97,11 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
//tess.setTranslation( -tc.getPos().getX(), -tc.getPos().getY(), -tc.getPos().getZ() );
//tess.startDrawingQuads();
RenderItem ri = Minecraft.getMinecraft().getRenderItem();
final RenderItem ri = Minecraft.getMinecraft().getRenderItem();
ItemStack stack = new ItemStack( blk );
IBakedModel model = ri.getItemModelMesher().getItemModel( stack );
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(model, 1.0F, 1.0F, 1.0F, 1.0F);
final ItemStack stack = new ItemStack( blk );
final IBakedModel model = ri.getItemModelMesher().getItemModel( stack );
Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor( model, 1.0F, 1.0F, 1.0F, 1.0F );
/*
renderBlocks.renderAllFaces = true;
@@ -39,11 +39,11 @@ public class RenderBlockEnergyCube extends BaseBlockRender<BlockEnergyCell, Tile
}
@Override
public void renderInventory( BlockEnergyCell blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockEnergyCell blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
IAEItemPowerStorage myItem = (IAEItemPowerStorage) is.getItem();
double internalCurrentPower = myItem.getAECurrentPower( is );
double internalMaxPower = myItem.getAEMaxPower( is );
final IAEItemPowerStorage myItem = (IAEItemPowerStorage) is.getItem();
final double internalCurrentPower = myItem.getAECurrentPower( is );
final double internalMaxPower = myItem.getAEMaxPower( is );
int meta = (int) ( 8.0 * ( internalCurrentPower / internalMaxPower ) );
@@ -62,10 +62,10 @@ public class RenderBlockEnergyCube extends BaseBlockRender<BlockEnergyCell, Tile
}
@Override
public boolean renderInWorld( BlockEnergyCell blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockEnergyCell blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.overrideBlockTexture = renderer.getIcon( world.getBlockState( pos ) )[0];// blk.getIcon( 0, meta );
boolean out = renderer.renderStandardBlock( blk, pos );
final boolean out = renderer.renderStandardBlock( blk, pos );
renderer.overrideBlockTexture = null;
return out;
@@ -66,7 +66,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
@Override
public void renderInventory( BlockInscriber blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockInscriber blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.renderAllFaces = true;
this.setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
@@ -105,7 +105,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
@Override
public boolean renderInWorld( BlockInscriber block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockInscriber block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
this.preRenderInWorld( block, world, pos, renderer );
@@ -148,7 +148,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
@Override
public void renderTile( BlockInscriber block, TileInscriber tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderTile( final BlockInscriber block, final TileInscriber tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
GL11.glPushMatrix();
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
@@ -190,7 +190,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
float press = 0.2f;
press -= progress / 5.0f;
IAESprite ic = ExtraBlockTextures.BlockInscriberInside.getIcon();
final IAESprite ic = ExtraBlockTextures.BlockInscriberInside.getIcon();
tess.startDrawingQuads();
float middle = 0.5f;
@@ -262,7 +262,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
}
}
public void renderItem( ItemStack sis, float o, AEBaseBlock block, AEBaseTile tile, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( sis != null )
{
@@ -303,7 +303,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
this.doRenderItem( sis, tile );
}
catch( Exception err )
catch( final Exception err )
{
AELog.error( err );
}
@@ -39,18 +39,18 @@ public class RenderBlockInterface extends BaseBlockRender<BlockInterface, TileIn
}
@Override
public boolean renderInWorld( BlockInterface block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockInterface block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileInterface ti = block.getTileEntity( world, pos );
BlockRenderInfo info = block.getRendererInstance();
final TileInterface ti = block.getTileEntity( world, pos );
final BlockRenderInfo info = block.getRendererInstance();
if( ti != null && ti.getForward() != null )
{
IAESprite side = ExtraBlockTextures.BlockInterfaceAlternateArrow.getIcon();
final IAESprite side = ExtraBlockTextures.BlockInterfaceAlternateArrow.getIcon();
info.setTemporaryRenderIcons( ExtraBlockTextures.BlockInterfaceAlternate.getIcon(), renderer.getIcon( world.getBlockState( pos ) )[0], side, side, side, side );
}
boolean fz = super.renderInWorld( block, world, pos, renderer );
final boolean fz = super.renderInWorld( block, world, pos, renderer );
info.setTemporaryRenderIcon( null );
@@ -44,30 +44,30 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
}
@Override
public void renderInventory( BlockPaint block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockPaint block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
}
@Override
public boolean renderInWorld( BlockPaint imb, IBlockAccess world, BlockPos pos, ModelGenerator tess )
public boolean renderInWorld( final BlockPaint imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator tess )
{
TilePaint tp = imb.getTileEntity( world, pos );
final TilePaint tp = imb.getTileEntity( world, pos );
boolean out = false;
if( tp != null )
{
// super.renderInWorld( imb, world, x, y, z, renderer );
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
final int x = pos.getX();
final int y = pos.getY();
final int z = pos.getZ();
IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
final IAESprite[] icoSet = { imb.getIcon( EnumFacing.UP, imb.getDefaultState() ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
int brightness = imb.getMixedBrightnessForBlock( world, pos );
final int brightness = imb.getMixedBrightnessForBlock( world, pos );
EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
final EnumSet<EnumFacing> validSides = EnumSet.noneOf( EnumFacing.class );
for( EnumFacing side : EnumFacing.VALUES )
for( final EnumFacing side : EnumFacing.VALUES )
{
if( tp.isSideValid( side ) )
{
@@ -76,8 +76,8 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
}
double offsetConstant = 0.001;
int lumen = 14 << 20 | 14 << 4;
for( Splotch s : tp.getDots() )
final int lumen = 14 << 20 | 14 << 4;
for( final Splotch s : tp.getDots() )
{
if( !validSides.contains( s.side ) )
{
@@ -98,7 +98,7 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
double offset = offsetConstant;
offsetConstant += 0.001;
double buffer = 0.1;
final double buffer = 0.1;
double pos_x = s.x();
double pos_y = s.y();
@@ -124,8 +124,8 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
pos_y += z;
}
IAESprite ico = icoSet[s.getSeed() % icoSet.length];
EnumFacing rs = s.side.getOpposite();
final IAESprite ico = icoSet[s.getSeed() % icoSet.length];
final EnumFacing rs = s.side.getOpposite();
switch( s.side )
{
@@ -39,20 +39,20 @@ public class RenderBlockQuartzAccelerator extends BaseBlockRender<BlockQuartzGro
}
@Override
public boolean renderInWorld( BlockQuartzGrowthAccelerator blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockQuartzGrowthAccelerator blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileEntity te = world.getTileEntity( pos );
final TileEntity te = world.getTileEntity( pos );
if( te instanceof TileQuartzGrowthAccelerator )
{
if( ( (TileQuartzGrowthAccelerator) te ).hasPower )
{
IAESprite top_Bottom = ExtraBlockTextures.BlockQuartzGrowthAcceleratorOn.getIcon();
IAESprite side = ExtraBlockTextures.BlockQuartzGrowthAcceleratorSideOn.getIcon();
final IAESprite top_Bottom = ExtraBlockTextures.BlockQuartzGrowthAcceleratorOn.getIcon();
final IAESprite side = ExtraBlockTextures.BlockQuartzGrowthAcceleratorSideOn.getIcon();
blk.getRendererInstance().setTemporaryRenderIcons( top_Bottom, top_Bottom, side, side, side, side );
}
}
boolean out = super.renderInWorld( blk, world, pos, renderer );
final boolean out = super.renderInWorld( blk, world, pos, renderer );
blk.getRendererInstance().setTemporaryRenderIcon( null );
return out;
@@ -54,7 +54,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
}
@Override
public void renderInventory( BlockSkyChest blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockSkyChest blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
//GL11.glEnable( GL12.GL_RESCALE_NORMAL );
//GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
@@ -78,13 +78,13 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
}
@Override
public boolean renderInWorld( BlockSkyChest blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockSkyChest blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
return true;
}
@Override
public void renderTile( BlockSkyChest block, TileSkyChest skyChest, WorldRenderer tess, double x, double y, double z, float partialTick, ModelGenerator renderer )
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
{
if( skyChest == null )
{
@@ -54,7 +54,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
}
@Override
public void renderInventory( BlockSkyCompass blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockSkyCompass blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
/*
if( type == ItemRenderType.INVENTORY )
@@ -176,13 +176,13 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
}
@Override
public boolean renderInWorld( BlockSkyCompass blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockSkyCompass blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
return true;
}
@Override
public void renderTile( BlockSkyCompass block, TileSkyCompass skyCompass, WorldRenderer tess, double x, double y, double z, float partialTick, ModelGenerator renderer )
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final WorldRenderer tess, final double x, final double y, final double z, final float partialTick, final ModelGenerator renderer )
{
if( skyCompass == null )
{
@@ -243,10 +243,10 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
}
private double flipidiy( double rad )
private double flipidiy( final double rad )
{
double x = Math.cos( rad );
double y = Math.sin( rad );
final double x = Math.cos( rad );
final double y = Math.sin( rad );
return Math.atan2( -y, x );
}
}
@@ -54,13 +54,13 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
}
@Override
public void renderInventory( BlockWireless blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockWireless blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
this.blk = blk;
center = new BlockPos(0,0,0);
this.hasChan = false;
this.hasPower = false;
BlockRenderInfo ri = blk.getRendererInstance();
final BlockRenderInfo ri = blk.getRendererInstance();
renderer.renderAllFaces = true;
@@ -81,18 +81,18 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
AEPartLocation[] sides = { AEPartLocation.EAST, AEPartLocation.WEST, AEPartLocation.UP, AEPartLocation.DOWN };
final AEPartLocation[] sides = { AEPartLocation.EAST, AEPartLocation.WEST, AEPartLocation.UP, AEPartLocation.DOWN };
int s = 1;
for( AEPartLocation side : sides )
for( final AEPartLocation side : sides )
{
this.renderBlockBounds( renderer, 8 + ( side.xOffset != 0 ? side.xOffset * 2 : -2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 2 : -2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 2 : -1 ) + s, 8 + ( side.xOffset != 0 ? side.xOffset * 4 : 2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 4 : 2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 5 : 1 ) + s, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
}
s = 3;
for( AEPartLocation side : sides )
for( final AEPartLocation side : sides )
{
this.renderBlockBounds( renderer, 8 + ( side.xOffset != 0 ? side.xOffset * 4 : -1 ), 8 + ( side.yOffset != 0 ? side.yOffset * 4 : -1 ), 1 + ( side.zOffset != 0 ? side.zOffset * 4 : -1 ) + s, 8 + ( side.xOffset != 0 ? side.xOffset * 5 : 1 ), 8 + ( side.yOffset != 0 ? side.yOffset * 5 : 1 ), 2 + ( side.zOffset != 0 ? side.zOffset * 5 : 1 ) + s, EnumFacing.EAST, EnumFacing.UP, EnumFacing.SOUTH );
@@ -101,20 +101,20 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
}
@Override
public boolean renderInWorld( BlockWireless blk, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockWireless blk, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileWireless tw = blk.getTileEntity( world, pos );
final TileWireless tw = blk.getTileEntity( world, pos );
this.blk = blk;
if( tw != null )
{
this.hasChan = ( tw.clientFlags & ( TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG ) ) == ( TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG );
this.hasPower = ( tw.clientFlags & TileWireless.POWERED_FLAG ) == TileWireless.POWERED_FLAG;
BlockRenderInfo ri = blk.getRendererInstance();
final BlockRenderInfo ri = blk.getRendererInstance();
EnumFacing fdy = tw.getUp();
EnumFacing fdz = tw.getForward();
EnumFacing fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
final EnumFacing fdy = tw.getUp();
final EnumFacing fdz = tw.getForward();
final EnumFacing fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
renderer.renderAllFaces = true;
@@ -136,18 +136,18 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
AEPartLocation[] sides = { AEPartLocation.EAST, AEPartLocation.WEST, AEPartLocation.UP, AEPartLocation.DOWN };
final AEPartLocation[] sides = { AEPartLocation.EAST, AEPartLocation.WEST, AEPartLocation.UP, AEPartLocation.DOWN };
int s = 1;
for( AEPartLocation side : sides )
for( final AEPartLocation side : sides )
{
this.renderBlockBounds( renderer, 8 + ( side.xOffset != 0 ? side.xOffset * 2 : -2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 2 : -2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 2 : -1 ) + s, 8 + ( side.xOffset != 0 ? side.xOffset * 4 : 2 ), 8 + ( side.yOffset != 0 ? side.yOffset * 4 : 2 ), 2 + ( side.zOffset != 0 ? side.zOffset * 5 : 1 ) + s, fdx, fdy, fdz );
super.renderInWorld( blk, world, pos, renderer );
}
s = 3;
for( AEPartLocation side : sides )
for( final AEPartLocation side : sides )
{
this.renderBlockBounds( renderer, 8 + ( side.xOffset != 0 ? side.xOffset * 4 : -1 ), 8 + ( side.yOffset != 0 ? side.yOffset * 4 : -1 ), 1 + ( side.zOffset != 0 ? side.zOffset * 4 : -1 ) + s, 8 + ( side.xOffset != 0 ? side.xOffset * 5 : 1 ), 8 + ( side.yOffset != 0 ? side.yOffset * 5 : 1 ), 2 + ( side.zOffset != 0 ? side.zOffset * 5 : 1 ) + s, fdx, fdy, fdz );
super.renderInWorld( blk, world, pos, renderer );
@@ -160,13 +160,13 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
if( this.hasChan )
{
int l = 14;
final int l = 14;
renderer.setBrightness( l << 20 | l << 4 );
renderer.setColorOpaque_I( AEColor.Transparent.blackVariant );
}
else if( this.hasPower )
{
int l = 9;
final int l = 9;
renderer.setBrightness( l << 20 | l << 4 );
renderer.setColorOpaque_I( AEColor.Transparent.whiteVariant );
}
@@ -208,10 +208,10 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
return true;
}
private void renderTorchAtAngle( ModelGenerator renderer, EnumFacing x, EnumFacing y, EnumFacing z )
private void renderTorchAtAngle( final ModelGenerator renderer, final EnumFacing x, final EnumFacing y, final EnumFacing z )
{
IAESprite r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : renderer.getIcon( blk.getDefaultState() )[0] );
IAESprite sides = new OffsetIcon( r, 0.0f, -2.0f );
final IAESprite r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : renderer.getIcon( blk.getDefaultState() )[0] );
final IAESprite sides = new OffsetIcon( r, 0.0f, -2.0f );
switch( z )
{
@@ -45,7 +45,7 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
}
@Override
public void renderInventory( BlockDrive block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockDrive block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.overrideBlockTexture = ExtraBlockTextures.White.getIcon();
this.renderInvBlock( EnumSet.of( AEPartLocation.SOUTH ), block, is, 0x000000, renderer );
@@ -55,26 +55,26 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
}
@Override
public boolean renderInWorld( BlockDrive imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockDrive imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileDrive sp = imb.getTileEntity( world, pos );
final TileDrive sp = imb.getTileEntity( world, pos );
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
EnumFacing up = sp.getUp();
EnumFacing forward = sp.getForward();
EnumFacing west = Platform.crossProduct( forward, up );
final EnumFacing up = sp.getUp();
final EnumFacing forward = sp.getForward();
final EnumFacing west = Platform.crossProduct( forward, up );
boolean result = super.renderInWorld( imb, world, pos, renderer );
final boolean result = super.renderInWorld( imb, world, pos, renderer );
IAESprite ico = ExtraBlockTextures.MEStorageCellTextures.getIcon();
final IAESprite ico = ExtraBlockTextures.MEStorageCellTextures.getIcon();
int b = world.getCombinedLight( pos.offset( forward ), 0 );
final int b = world.getCombinedLight( pos.offset( forward ), 0 );
for( int yy = 0; yy < 5; yy++ )
{
for( int xx = 0; xx < 2; xx++ )
{
int stat = sp.getCellStatus( yy * 2 + ( 1 - xx ) );
final int stat = sp.getCellStatus( yy * 2 + ( 1 - xx ) );
this.selectFace( renderer, west, up, forward, 2 + xx * 7, 7 + xx * 7, 1 + yy * 3, 3 + yy * 3 );
int spin = 0;
@@ -210,9 +210,9 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
double v3 = ico.getInterpolatedV( ( ( spin + 3 ) % 4 < 2 ) ? m : mx );
double v4 = ico.getInterpolatedV( ( ( spin ) % 4 < 2 ) ? m : mx );
int x= pos.getX();
int y= pos.getY();
int z= pos.getZ();
final int x= pos.getX();
final int y= pos.getY();
final int z= pos.getZ();
renderer.setBrightness( b );
renderer.setColorOpaque_I( 0xffffff );
@@ -267,7 +267,7 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
if( stat != 0 )
{
IAESprite whiteIcon = ExtraBlockTextures.White.getIcon();
final IAESprite whiteIcon = ExtraBlockTextures.White.getIcon();
u1 = whiteIcon.getInterpolatedU( ( spin % 4 < 2 ) ? 1 : 6 );
u2 = whiteIcon.getInterpolatedU( ( ( spin + 1 ) % 4 < 2 ) ? 1 : 6 );
u3 = whiteIcon.getInterpolatedU( ( ( spin + 2 ) % 4 < 2 ) ? 1 : 6 );
@@ -50,7 +50,7 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
}
@Override
public void renderInventory( BlockChest block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockChest block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setBrightness( 0 );
renderer.overrideBlockTexture = ExtraBlockTextures.White.getIcon();
@@ -64,9 +64,9 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
}
@Override
public boolean renderInWorld( BlockChest imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockChest imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileChest sp = imb.getTileEntity( world, pos );
final TileChest sp = imb.getTileEntity( world, pos );
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
if( sp == null )
@@ -74,14 +74,14 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
return false;
}
EnumFacing up = sp.getUp();
EnumFacing forward = sp.getForward();
EnumFacing west = Platform.crossProduct( forward, up );
final EnumFacing up = sp.getUp();
final EnumFacing forward = sp.getForward();
final EnumFacing west = Platform.crossProduct( forward, up );
this.preRenderInWorld( imb, world, pos, renderer );
int stat = sp.getCellStatus( 0 );
boolean result = renderer.renderStandardBlock( imb, pos );
final int stat = sp.getCellStatus( 0 );
final boolean result = renderer.renderStandardBlock( imb, pos );
this.selectFace( renderer, west, up, forward, 5, 16 - 5, 9, 12 );
@@ -95,8 +95,8 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
renderer.setBrightness( b );
renderer.setColorOpaque_I( 0xffffff );
int offsetU = -4;
FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
final int offsetU = -4;
final FlippableIcon flippableIcon = new FlippableIcon( new OffsetIcon( ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV ) );
if( forward == EnumFacing.EAST && ( up == EnumFacing.NORTH || up == EnumFacing.SOUTH ) )
{
flippableIcon.setFlip( true, false );
@@ -162,7 +162,7 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
renderer.setColorOpaque_I( 0xffffff );
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
ICellHandler ch = AEApi.instance().registries().cell().getHandler( sp.getStorageType() );
final ICellHandler ch = AEApi.instance().registries().cell().getHandler( sp.getStorageType() );
renderer.setColorOpaque_I( sp.getColor().whiteVariant );
IAESprite ico = ch == null ? null : ch.getTopTexture_Light();
@@ -38,13 +38,13 @@ public class RenderNull extends BaseBlockRender<AEBaseBlock, AEBaseTile>
}
@Override
public void renderInventory( AEBaseBlock block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final AEBaseBlock block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
}
@Override
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final AEBaseBlock block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
return true;
}
@@ -47,19 +47,19 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
{
@Override
public void renderInventory( BlockQuantumBase block, ItemStack item, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockQuantumBase block, final ItemStack item, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
float minPx = 2.0f / 16.0f;
float maxPx = 14.0f / 16.0f;
final float minPx = 2.0f / 16.0f;
final float maxPx = 14.0f / 16.0f;
renderer.setRenderBounds( minPx, minPx, minPx, maxPx, maxPx, maxPx );
super.renderInventory( block, item, renderer, type, obj );
}
@Override
public boolean renderInWorld( BlockQuantumBase block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockQuantumBase block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileQuantumBridge tqb = block.getTileEntity( world, pos );
final TileQuantumBridge tqb = block.getTileEntity( world, pos );
if( tqb == null )
{
return false;
@@ -71,22 +71,22 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
final IBlocks blocks = definitions.blocks();
final IParts parts = definitions.parts();
for( Block linkBlock : blocks.quantumLink().maybeBlock().asSet() )
for( final Block linkBlock : blocks.quantumLink().maybeBlock().asSet() )
{
if( tqb.getBlockType() == linkBlock )
{
if( tqb.isFormed() )
{
EnumSet<AEPartLocation> sides = tqb.getConnections();
final EnumSet<AEPartLocation> sides = tqb.getConnections();
this.renderCableAt( 0.11D, world, pos, block, renderer, renderer.getIcon( parts.cableGlass().stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
final Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
this.renderCableAt( 0.188D, world, pos, block, renderer, renderer.getIcon( parts.cableCovered().stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
}
float renderMin = 2.0f / 16.0f;
float renderMax = 14.0f / 16.0f;
final float renderMin = 2.0f / 16.0f;
final float renderMax = 14.0f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.renderStandardBlock( block, pos );
}
@@ -94,14 +94,14 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
{
if( !tqb.isFormed() )
{
float renderMin = 2.0f / 16.0f;
float renderMax = 14.0f / 16.0f;
final float renderMin = 2.0f / 16.0f;
final float renderMax = 14.0f / 16.0f;
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.renderStandardBlock( block, pos );
}
else if( tqb.isCorner() )
{
Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
final Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
this.renderCableAt( 0.188D, world, pos, block, renderer, renderer.getIcon( parts.cableCovered().stack( AEColor.Transparent, 1 ) ), 0.05D, tqb.getConnections() );
float renderMin = 4.0f / 16.0f;
@@ -118,9 +118,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
int bn = 15;
final int bn = 15;
renderer.setBrightness( bn << 20 | bn << 4 );
for( EnumFacing side : EnumFacing.VALUES )
for( final EnumFacing side : EnumFacing.VALUES )
{
this.renderFace( pos, block, ExtraBlockTextures.BlockQRingCornerLight.getIcon(), renderer, side );
}
@@ -146,9 +146,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
renderer.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
int bn = 15;
final int bn = 15;
renderer.setBrightness( bn << 20 | bn << 4 );
for( EnumFacing side : EnumFacing.VALUES )
for( final EnumFacing side : EnumFacing.VALUES )
{
this.renderFace( pos, block, ExtraBlockTextures.BlockQRingEdgeLight.getIcon(), renderer, side );
}
@@ -161,7 +161,7 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
return true;
}
private void renderCableAt( double thickness, IBlockAccess world, BlockPos pos, BlockQuantumBase block, ModelGenerator renderer, IAESprite texture, double pull, Collection<AEPartLocation> connections )
private void renderCableAt( final double thickness, final IBlockAccess world, final BlockPos pos, final BlockQuantumBase block, final ModelGenerator renderer, final IAESprite texture, final double pull, final Collection<AEPartLocation> connections )
{
block.getRendererInstance().setTemporaryRenderIcon( texture );
@@ -45,7 +45,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
super( false, 0 );
if( offsets == null )
{
Random r = new Random( 924 );
final Random r = new Random( 924 );
offsets = new byte[10][10][10];
for( int x = 0; x < 10; x++ )
{
@@ -58,7 +58,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
}
@Override
public void renderInventory( QuartzGlassBlock block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final QuartzGlassBlock block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.overrideBlockTexture = ExtraBlockTextures.GlassFrame.getIcon();
super.renderInventory( block, is, renderer, type, obj );
@@ -67,16 +67,16 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
}
@Override
public boolean renderInWorld( QuartzGlassBlock imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final QuartzGlassBlock imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
int cx = Math.abs( pos.getX() % 10 );
int cy = Math.abs( pos.getY() % 10 );
int cz = Math.abs( pos.getZ() % 10 );
final int cx = Math.abs( pos.getX() % 10 );
final int cy = Math.abs( pos.getY() % 10 );
final int cz = Math.abs( pos.getZ() % 10 );
int u = offsets[cx][cy][cz] % 4;
int v = offsets[9 - cx][9 - cy][9 - cz] % 4;
final int u = offsets[cx][cy][cz] % 4;
final int v = offsets[9 - cx][9 - cy][9 - cz] % 4;
switch( Math.abs( ( offsets[cx][cy][cz] + ( pos.getX()+pos.getY()+pos.getZ() ) ) % 4 ) )
{
@@ -94,7 +94,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
break;
}
boolean result = renderer.renderStandardBlock( imb, pos );
final boolean result = renderer.renderStandardBlock( imb, pos );
renderer.overrideBlockTexture = null;
this.renderEdge( imb, world, pos, renderer, AEPartLocation.UP, AEPartLocation.EAST );
@@ -130,7 +130,7 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
return result;
}
private void renderEdge( QuartzGlassBlock imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer, AEPartLocation side, AEPartLocation direction )
private void renderEdge( final QuartzGlassBlock imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer, final AEPartLocation side, final AEPartLocation direction )
{
if( !this.isFlush( imb, world, pos.getX() + side.xOffset, pos.getY() + side.yOffset, pos.getZ() + side.zOffset ) )
{
@@ -214,22 +214,22 @@ public class RenderQuartzGlass extends BaseBlockRender<QuartzGlassBlock, AEBaseT
}
}
private boolean isFlush( QuartzGlassBlock imb, IBlockAccess world, int x, int y, int z )
private boolean isFlush( final QuartzGlassBlock imb, final IBlockAccess world, final int x, final int y, final int z )
{
return this.isGlass( imb, world, new BlockPos(x, y, z) );
}
private boolean isGlass( QuartzGlassBlock imb, IBlockAccess world,BlockPos pos)
private boolean isGlass( final QuartzGlassBlock imb, final IBlockAccess world, final BlockPos pos)
{
return this.isQuartzGlass( world, pos ) || this.isVibrantQuartzGlass( world, pos );
}
private boolean isQuartzGlass( IBlockAccess world,BlockPos pos)
private boolean isQuartzGlass( final IBlockAccess world, final BlockPos pos)
{
return AEApi.instance().definitions().blocks().quartzGlass().isSameAs( world, pos );
}
private boolean isVibrantQuartzGlass( IBlockAccess world,BlockPos pos)
private boolean isVibrantQuartzGlass( final IBlockAccess world, final BlockPos pos)
{
return AEApi.instance().definitions().blocks().quartzVibrantGlass().isSameAs( world, pos );
}
@@ -39,7 +39,7 @@ public class RenderQuartzOre extends BaseBlockRender<QuartzOreBlock, AEBaseTile>
}
@Override
public void renderInventory( QuartzOreBlock blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final QuartzOreBlock blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
super.renderInventory( blk, is, renderer, type, obj );
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.OreQuartzStone.getIcon() );
@@ -48,14 +48,14 @@ public class RenderQuartzOre extends BaseBlockRender<QuartzOreBlock, AEBaseTile>
}
@Override
public boolean renderInWorld( QuartzOreBlock quartz, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final QuartzOreBlock quartz, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
quartz.setEnhanceBrightness( true );
super.renderInWorld( quartz, world, pos, renderer );
quartz.setEnhanceBrightness( false );
quartz.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.OreQuartzStone.getIcon() );
boolean out = super.renderInWorld( quartz, world, pos, renderer );
final boolean out = super.renderInWorld( quartz, world, pos, renderer );
quartz.getRendererInstance().setTemporaryRenderIcon( null );
return out;
@@ -44,22 +44,22 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
}
@Override
public void renderInventory( AEBaseBlock blk, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final AEBaseBlock blk, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
float Point3 = 7.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
final float Point3 = 7.0f / 16.0f;
final float Point12 = 9.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float renderTop = 10.0f / 16.0f;
final float renderBottom = 5.0f / 16.0f;
final float renderTop = 10.0f / 16.0f;
float xOff = 0.0f;
float yOff = 0.0f;
float zOff = 0.0f;
final float xOff = 0.0f;
final float yOff = 0.0f;
final float zOff = 0.0f;
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
float singlePixel = 1.0f / 16.0f;
final float singlePixel = 1.0f / 16.0f;
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
@@ -70,10 +70,10 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
blk.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
renderer.renderAllFaces = true;
float top = 8.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point2 = 6.0f / 16.0f;
final float top = 8.0f / 16.0f;
final float bottom = 7.0f / 16.0f;
final float Point13 = 10.0f / 16.0f;
final float Point2 = 6.0f / 16.0f;
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
this.renderInvBlock( EnumSet.allOf( AEPartLocation.class ), blk, is, 0xffffff, renderer );
@@ -92,9 +92,9 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
}
@Override
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final AEBaseBlock block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, pos );
final IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, pos );
renderer.renderAllFaces = true;
float zOff = 0.0f;
@@ -102,21 +102,21 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
float xOff = 0.0f;
if( te != null )
{
AEPartLocation forward = AEPartLocation.fromFacing( te.getUp() );
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp() );
xOff = forward.xOffset * -( 4.0f / 16.0f );
yOff = forward.yOffset * -( 4.0f / 16.0f );
zOff = forward.zOffset * -( 4.0f / 16.0f );
}
float renderTop = 10.0f / 16.0f;
float renderBottom = 5.0f / 16.0f;
float Point12 = 9.0f / 16.0f;
float Point3 = 7.0f / 16.0f;
final float renderTop = 10.0f / 16.0f;
final float renderBottom = 5.0f / 16.0f;
final float Point12 = 9.0f / 16.0f;
final float Point3 = 7.0f / 16.0f;
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
super.renderInWorld( block, world, pos, renderer );
int r = ( pos.getX() + pos.getY() + pos.getZ() ) % 2;
float singlePixel = 1.0f / 16.0f;
final int r = ( pos.getX() + pos.getY() + pos.getZ() ) % 2;
final float singlePixel = 1.0f / 16.0f;
if( r == 0 )
{
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
@@ -136,12 +136,12 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
block.getRendererInstance().setTemporaryRenderIcon( renderer.getIcon( Blocks.hopper.getDefaultState() )[0] );
float top = 8.0f / 16.0f;
float bottom = 7.0f / 16.0f;
float Point13 = 10.0f / 16.0f;
float Point2 = 6.0f / 16.0f;
final float top = 8.0f / 16.0f;
final float bottom = 7.0f / 16.0f;
final float Point13 = 10.0f / 16.0f;
final float Point2 = 6.0f / 16.0f;
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
boolean out = renderer.renderStandardBlock( block, pos );
final boolean out = renderer.renderStandardBlock( block, pos );
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
renderer.renderStandardBlock( block, pos );
@@ -154,7 +154,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
if( te != null )
{
AEPartLocation forward = AEPartLocation.fromFacing( te.getUp());
final AEPartLocation forward = AEPartLocation.fromFacing( te.getUp());
switch( forward )
{
case EAST:
@@ -43,7 +43,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
}
@Override
public void renderInventory( BlockSpatialPylon block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockSpatialPylon block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.overrideBlockTexture = ExtraBlockTextures.BlockSpatialPylon_dim.getIcon();
super.renderInventory( block, is, renderer, type, obj );
@@ -52,13 +52,13 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
}
@Override
public boolean renderInWorld( BlockSpatialPylon imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockSpatialPylon imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
TileSpatialPylon sp = imb.getTileEntity( world, pos );
final TileSpatialPylon sp = imb.getTileEntity( world, pos );
int displayBits = ( sp == null ) ? 0 : sp.getDisplayBits();
final int displayBits = ( sp == null ) ? 0 : sp.getDisplayBits();
if( displayBits != 0 )
{
@@ -123,19 +123,19 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
}
}
BlockRenderInfo bri = imb.getRendererInstance();
final BlockRenderInfo bri = imb.getRendererInstance();
bri.setTemporaryRenderIcon( null );
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.UP, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.DOWN, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.SOUTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.NORTH, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.EAST, renderer ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, EnumFacing.WEST , renderer) );
boolean r = renderer.renderStandardBlock( imb, pos );
final boolean r = renderer.renderStandardBlock( imb, pos );
if( ( displayBits & TileSpatialPylon.DISPLAY_POWERED_ENABLED ) == TileSpatialPylon.DISPLAY_POWERED_ENABLED )
{
int bn = 15;
final int bn = 15;
renderer.setBrightness( bn << 20 | bn << 4 );
renderer.setColorOpaque_I( 0xffffff );
for( EnumFacing d : EnumFacing.VALUES )
for( final EnumFacing d : EnumFacing.VALUES )
{
this.renderFace( pos, imb, this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, d,renderer ), renderer, d );
}
@@ -164,7 +164,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
return result;
}
private IAESprite getBlockTextureFromSideOutside( BlockSpatialPylon blk, TileSpatialPylon sp, int displayBits, EnumFacing ori, EnumFacing dir, ModelGenerator renderer )
private IAESprite getBlockTextureFromSideOutside( final BlockSpatialPylon blk, final TileSpatialPylon sp, final int displayBits, final EnumFacing ori, final EnumFacing dir, final ModelGenerator renderer )
{
if( ori == dir || ori.getOpposite() == dir )
@@ -188,9 +188,9 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
return renderer.getIcon( blk.getDefaultState() )[0];// blk.getIcon( 0, 0 );
}
private IAESprite getBlockTextureFromSideInside( BlockSpatialPylon blk, TileSpatialPylon sp, int displayBits, EnumFacing ori, EnumFacing dir, ModelGenerator renderer )
private IAESprite getBlockTextureFromSideInside( final BlockSpatialPylon blk, final TileSpatialPylon sp, final int displayBits, final EnumFacing ori, final EnumFacing dir, final ModelGenerator renderer )
{
boolean good = ( displayBits & TileSpatialPylon.DISPLAY_ENABLED ) == TileSpatialPylon.DISPLAY_ENABLED;
final boolean good = ( displayBits & TileSpatialPylon.DISPLAY_ENABLED ) == TileSpatialPylon.DISPLAY_ENABLED;
if( ori == dir || ori.getOpposite() == dir )
{
@@ -41,7 +41,7 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
}
@Override
public void renderInventory( BlockTinyTNT block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() )) );
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
@@ -49,12 +49,12 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
}
@Override
public boolean renderInWorld( BlockTinyTNT imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
renderer.setOverrideBlockTexture( new FullIcon( Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getTexture( Blocks.tnt.getDefaultState() )) );
renderer.renderAllFaces = true;
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
boolean out = super.renderInWorld( imb, world, pos, renderer );
final boolean out = super.renderInWorld( imb, world, pos, renderer );
renderer.renderAllFaces = false;
return out;
}
@@ -54,7 +54,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
}
@Override
public void renderInventory( BlockCableBus blk, ItemStack item, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockCableBus blk, final ItemStack item, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.setColorOpaque_F( 1, 1, 1 );
renderer.setBrightness( 14 << 20 | 14 << 4 );
@@ -72,8 +72,8 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
if( item.getItem() instanceof IFacadeItem )
{
IFacadeItem fi = (IFacadeItem) item.getItem();
IFacadePart fp = fi.createPartFromItemStack( item, AEPartLocation.SOUTH );
final IFacadeItem fi = (IFacadeItem) item.getItem();
final IFacadePart fp = fi.createPartFromItemStack( item, AEPartLocation.SOUTH );
if( fp != null )
{
@@ -82,12 +82,12 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
}
else
{
IPart ip = this.getRenderer( item, (IPartItem) item.getItem() );
final IPart ip = this.getRenderer( item, (IPartItem) item.getItem() );
if( ip != null )
{
if( type == ItemRenderType.ENTITY )
{
int depth = ip.cableConnectionRenderTo();
final int depth = ip.cableConnectionRenderTo();
}
ip.renderInventory( BusRenderHelper.INSTANCE, renderer );
@@ -97,9 +97,9 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
}
public IPart getRenderer( ItemStack is, IPartItem c )
public IPart getRenderer( final ItemStack is, final IPartItem c )
{
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
final int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
IPart part = RENDER_PART.get( id );
if( part == null )
@@ -118,9 +118,9 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
private static final Map<Integer, IPart> RENDER_PART = new HashMap<Integer, IPart>();
@Override
public boolean renderInWorld( BlockCableBus block, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockCableBus block, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
AEBaseTile t = block.getTileEntity( world, pos );
final AEBaseTile t = block.getTileEntity( world, pos );
if( t instanceof TileCableBus )
{
@@ -136,7 +136,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
}
@Override
public void renderTile( BlockCableBus block, TileCableBus cableBus, WorldRenderer tess, double x, double y, double z, float f, ModelGenerator renderer )
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final WorldRenderer tess, final double x, final double y, final double z, final float f, final ModelGenerator renderer )
{
if( cableBus != null )
{
@@ -45,7 +45,7 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
}
@Override
public void renderInventory( BlockSecurity block, ItemStack is, ModelGenerator renderer, ItemRenderType type, Object[] obj )
public void renderInventory( final BlockSecurity block, final ItemStack is, final ModelGenerator renderer, final ItemRenderType type, final Object[] obj )
{
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
this.renderInvBlock( EnumSet.of( AEPartLocation.SOUTH ), block, is, 0x000000, renderer );
@@ -58,16 +58,16 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
}
@Override
public boolean renderInWorld( BlockSecurity imb, IBlockAccess world, BlockPos pos, ModelGenerator renderer )
public boolean renderInWorld( final BlockSecurity imb, final IBlockAccess world, final BlockPos pos, final ModelGenerator renderer )
{
TileSecurity sp = imb.getTileEntity( world, pos );
final TileSecurity sp = imb.getTileEntity( world, pos );
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
EnumFacing up = sp.getUp();
final EnumFacing up = sp.getUp();
this.preRenderInWorld( imb, world, pos, renderer );
boolean result = renderer.renderStandardBlock( imb, pos );
final boolean result = renderer.renderStandardBlock( imb, pos );
int b = world.getCombinedLight( pos.offset( up ), 0 );
if( sp.isActive() )
@@ -37,7 +37,7 @@ public class AssemblerFX extends EntityFX
final float speed;
float time = 0;
public AssemblerFX( World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is )
public AssemblerFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b, final float speed, final IAEItemStack is )
{
super( w, x, y, z, r, g, b );
this.motionX = 0;
@@ -52,9 +52,9 @@ public class AssemblerFX extends EntityFX
}
@Override
public int getBrightnessForRender( float par1 )
public int getBrightnessForRender( final float par1 )
{
int j1 = 13;
final int j1 = 13;
return j1 << 20 | j1 << 4;
}
@@ -69,13 +69,13 @@ public class AssemblerFX extends EntityFX
}
else
{
float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
final float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
this.fi.setProgress( lifeSpan );
}
}
@Override
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float l, float rX, float rY, float rZ, float rYZ, float rXY )
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
this.time += l;
if( this.time > 4.0 )
@@ -26,13 +26,13 @@ import net.minecraft.world.World;
public class ChargedOreFX extends EntityReddustFX
{
public ChargedOreFX( World w, double x, double y, double z, float r, float g, float b )
public ChargedOreFX( final World w, final double x, final double y, final double z, final float r, final float g, final float b )
{
super( w, x, y, z, 0.21f, 0.61f, 1.0f );
}
@Override
public int getBrightnessForRender( float par1 )
public int getBrightnessForRender( final float par1 )
{
int j1 = super.getBrightnessForRender( par1 );
j1 = Math.max( j1 >> 20, j1 >> 4 );
@@ -42,7 +42,7 @@ public class CraftingFx extends EntityBreakingFX
private final int startBlkY;
private final int startBlkZ;
public CraftingFx( World par1World, double par2, double par4, double par6, Item par8Item )
public CraftingFx( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
{
super( par1World, par2, par4, par6, par8Item );
this.particleGravity = 0;
@@ -68,26 +68,26 @@ public class CraftingFx extends EntityBreakingFX
}
@Override
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float partialTick, float x, float y, float z, float rx, float rz)
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float partialTick, final float x, final float y, final float z, final float rx, final float rz)
{
if( partialTick < 0 || partialTick > 1 )
{
return;
}
float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV();
float f9 = this.particleTextureIndex.getMaxV();
float scale = 0.1F * this.particleScale;
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
final float f8 = this.particleTextureIndex.getMinV();
final float f9 = this.particleTextureIndex.getMaxV();
final float scale = 0.1F * this.particleScale;
float offX = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * partialTick );
float offY = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * partialTick );
float offZ = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * partialTick );
int blkX = MathHelper.floor_double( offX );
int blkY = MathHelper.floor_double( offY );
int blkZ = MathHelper.floor_double( offZ );
final int blkX = MathHelper.floor_double( offX );
final int blkY = MathHelper.floor_double( offY );
final int blkZ = MathHelper.floor_double( offZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
offX -= interpPosX;
@@ -95,7 +95,7 @@ public class CraftingFx extends EntityBreakingFX
offZ -= interpPosZ;
// AELog.info( "" + partialTick );
float f14 = 1.0F;
final float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( offX - x * scale - rx * scale, offY - y * scale, offZ - z * scale - rz * scale, f7, f9 );
par1Tessellator.addVertexWithUV( offX - x * scale + rx * scale, offY + y * scale, offZ - z * scale + rz * scale, f7, f8 );
@@ -104,7 +104,7 @@ public class CraftingFx extends EntityBreakingFX
}
}
public void fromItem( AEPartLocation d )
public void fromItem( final AEPartLocation d )
{
this.posX += 0.2 * d.xOffset;
this.posY += 0.2 * d.yOffset;
@@ -42,7 +42,7 @@ public class EnergyFx extends EntityBreakingFX
private final int startBlkY;
private final int startBlkZ;
public EnergyFx( World par1World, double par2, double par4, double par6, Item par8Item )
public EnergyFx( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
{
super( par1World, par2, par4, par6, par8Item );
this.particleGravity = 0;
@@ -67,25 +67,25 @@ public class EnergyFx extends EntityBreakingFX
}
@Override
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float par2, float par3, float par4, float par5, float par6, float par7)
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7)
{
float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV();
float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.1F * this.particleScale;
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
final float f8 = this.particleTextureIndex.getMinV();
final float f9 = this.particleTextureIndex.getMaxV();
final float f10 = 0.1F * this.particleScale;
float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
final float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
int blkX = MathHelper.floor_double( this.posX );
int blkY = MathHelper.floor_double( this.posY );
int blkZ = MathHelper.floor_double( this.posZ );
final int blkX = MathHelper.floor_double( this.posX );
final int blkY = MathHelper.floor_double( this.posY );
final int blkZ = MathHelper.floor_double( this.posZ );
if( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
{
float f14 = 1.0F;
final float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9 );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 + par6 * f10, f12 + par4 * f10, f13 - par5 * f10 + par7 * f10, f7, f8 );
@@ -94,7 +94,7 @@ public class EnergyFx extends EntityBreakingFX
}
}
public void fromItem( AEPartLocation d )
public void fromItem( final AEPartLocation d )
{
this.posX += 0.2 * d.xOffset;
this.posY += 0.2 * d.yOffset;
@@ -32,7 +32,7 @@ public class LightningArcFX extends LightningFX
final double ry;
final double rz;
public LightningArcFX( World w, double x, double y, double z, double ex, double ey, double ez, double r, double g, double b )
public LightningArcFX( final World w, final double x, final double y, final double z, final double ex, final double ey, final double ez, final double r, final double g, final double b )
{
super( w, x, y, z, r, g, b, 6 );
this.noClip = true;
@@ -47,12 +47,12 @@ public class LightningArcFX extends LightningFX
@Override
protected void regen()
{
double i = 1.0 / ( this.steps - 1 );
double lastDirectionX = this.rx * i;
double lastDirectionY = this.ry * i;
double lastDirectionZ = this.rz * i;
final double i = 1.0 / ( this.steps - 1 );
final double lastDirectionX = this.rx * i;
final double lastDirectionY = this.ry * i;
final double lastDirectionZ = this.rz * i;
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
final double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
for( int s = 0; s < this.steps; s++ )
{
this.Steps[s][0] = ( lastDirectionX + ( RANDOM_GENERATOR.nextDouble() - 0.5 ) * len * 1.2 ) / 2.0;
@@ -41,13 +41,13 @@ public class LightningFX extends EntityFX
float currentPoint = 0;
boolean hasData = false;
public LightningFX( World w, double x, double y, double z, double r, double g, double b )
public LightningFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b )
{
this( w, x, y, z, r, g, b, 6 );
this.regen();
}
protected LightningFX( World w, double x, double y, double z, double r, double g, double b, int maxAge )
protected LightningFX( final World w, final double x, final double y, final double z, final double r, final double g, final double b, final int maxAge )
{
super( w, x, y, z, r, g, b );
this.Steps = new double[this.steps][3];
@@ -77,39 +77,39 @@ public class LightningFX extends EntityFX
}
@Override
public int getBrightnessForRender( float par1 )
public int getBrightnessForRender( final float par1 )
{
int j1 = 13;
final int j1 = 13;
return j1 << 20 | j1 << 4;
}
@Override
public void renderParticle(WorldRenderer tess, Entity p_180434_2_, float l, float rX, float rY, float rZ, float rYZ, float rXY )
public void renderParticle( final WorldRenderer tess, final Entity p_180434_2_, final float l, final float rX, final float rY, final float rZ, final float rYZ, final float rXY )
{
float j = 1.0f;
final float j = 1.0f;
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
if( this.particleAge == 3 )
{
this.regen();
}
double f6 = this.particleTextureIndexX / 16.0;
double f7 = f6 + 0.0324375F;
final double f7 = f6 + 0.0324375F;
double f8 = this.particleTextureIndexY / 16.0;
double f9 = f8 + 0.0324375F;
final double f9 = f8 + 0.0324375F;
f6 = f7;
f8 = f9;
double scale = 0.02;// 0.02F * this.particleScale;
double[] a = new double[3];
double[] b = new double[3];
final double[] a = new double[3];
final double[] b = new double[3];
double ox = 0;
double oy = 0;
double oz = 0;
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
final EntityPlayer p = Minecraft.getMinecraft().thePlayer;
double offX = -rZ;
double offY = MathHelper.cos( (float) ( Math.PI / 2.0f + p.rotationPitch * 0.017453292F ) );
double offZ = rX;
@@ -143,13 +143,13 @@ public class LightningFX extends EntityFX
for( int s = 0; s < this.steps; s++ )
{
double xN = x + this.Steps[s][0];
double yN = y + this.Steps[s][1];
double zN = z + this.Steps[s][2];
final double xN = x + this.Steps[s][0];
final double yN = y + this.Steps[s][1];
final double zN = z + this.Steps[s][2];
double xD = xN - x;
double yD = yN - y;
double zD = zN - z;
final double xD = xN - x;
final double yD = yN - y;
final double zD = zN - z;
if( cycle == 0 )
{
@@ -170,7 +170,7 @@ public class LightningFX extends EntityFX
oz = ( xD * 0 ) - ( 1 * yD );
}
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) this.steps - (double) s ) / this.steps ) * scale );
final double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ( ( ( (double) this.steps - (double) s ) / this.steps ) * scale );
ox /= ss;
oy /= ss;
oz /= ss;
@@ -202,7 +202,7 @@ public class LightningFX extends EntityFX
this.hasData = false;
}
private void draw( WorldRenderer tess, double[] a, double[] b, double f6, double f8 )
private void draw( final WorldRenderer tess, final double[] a, final double[] b, final double f6, final double f8 )
{
if( this.hasData )
{
@@ -34,7 +34,7 @@ public class MatterCannonFX extends EntityBreakingFX
private final TextureAtlasSprite particleTextureIndex;
public MatterCannonFX( World par1World, double par2, double par4, double par6, Item par8Item )
public MatterCannonFX( final World par1World, final double par2, final double par4, final double par6, final Item par8Item )
{
super( par1World, par2, par4, par6, par8Item );
this.particleGravity = 0;
@@ -50,7 +50,7 @@ public class MatterCannonFX extends EntityBreakingFX
this.noClip = true;
}
public void fromItem( AEPartLocation d )
public void fromItem( final AEPartLocation d )
{
this.particleScale *= 1.2f;
}
@@ -70,18 +70,18 @@ public class MatterCannonFX extends EntityBreakingFX
}
@Override
public void renderParticle(WorldRenderer par1Tessellator, Entity p_180434_2_, float par2, float par3, float par4, float par5, float par6, float par7 )
public void renderParticle( final WorldRenderer par1Tessellator, final Entity p_180434_2_, final float par2, final float par3, final float par4, final float par5, final float par6, final float par7 )
{
float f6 = this.particleTextureIndex.getMinU();
float f7 = this.particleTextureIndex.getMaxU();
float f8 = this.particleTextureIndex.getMinV();
float f9 = this.particleTextureIndex.getMaxV();
float f10 = 0.05F * this.particleScale;
final float f6 = this.particleTextureIndex.getMinU();
final float f7 = this.particleTextureIndex.getMaxU();
final float f8 = this.particleTextureIndex.getMinV();
final float f9 = this.particleTextureIndex.getMaxV();
final float f10 = 0.05F * this.particleScale;
float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
float f14 = 1.0F;
final float f11 = (float) ( this.prevPosX + ( this.posX - this.prevPosX ) * par2 - interpPosX );
final float f12 = (float) ( this.prevPosY + ( this.posY - this.prevPosY ) * par2 - interpPosY );
final float f13 = (float) ( this.prevPosZ + ( this.posZ - this.prevPosZ ) * par2 - interpPosZ );
final float f14 = 1.0F;
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10, f7, f9 );
@@ -29,10 +29,10 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class VibrantFX extends EntityFX
{
public VibrantFX( World par1World, double x, double y, double z, double par8, double par10, double par12 )
public VibrantFX( final World par1World, final double x, final double y, final double z, final double par8, final double par10, final double par12 )
{
super( par1World, x, y, z, par8, par10, par12 );
float f = this.rand.nextFloat() * 0.1F + 0.8F;
final float f = this.rand.nextFloat() * 0.1F + 0.8F;
this.particleRed = f * 0.7f;
this.particleGreen = f * 0.89f;
this.particleBlue = f * 0.9f;
@@ -50,7 +50,7 @@ public class VibrantFX extends EntityFX
}
@Override
public float getBrightness( float par1 )
public float getBrightness( final float par1 )
{
return 1.0f;
}
@@ -36,19 +36,19 @@ public class PaintBallRender implements IItemRenderer
{
@Override
public boolean handleRenderType( ItemStack item, ItemRenderType type )
public boolean handleRenderType( final ItemStack item, final ItemRenderType type )
{
return true;
}
@Override
public boolean shouldUseRenderHelper( ItemRenderType type, ItemStack item, ItemRendererHelper helper )
public boolean shouldUseRenderHelper( final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper )
{
return helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION;
}
@Override
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
IIcon par2Icon = item.getIconIndex();
if( item.getItemDamage() >= 20 )
@@ -56,28 +56,28 @@ public class PaintBallRender implements IItemRenderer
par2Icon = ExtraItemTextures.ItemPaintBallShimmer.getIcon();
}
float f4 = par2Icon.getMinU();
float f5 = par2Icon.getMaxU();
float f6 = par2Icon.getMinV();
float f7 = par2Icon.getMaxV();
final float f4 = par2Icon.getMinU();
final float f5 = par2Icon.getMaxU();
final float f6 = par2Icon.getMinV();
final float f7 = par2Icon.getMaxV();
ItemPaintBall ipb = (ItemPaintBall) item.getItem();
final ItemPaintBall ipb = (ItemPaintBall) item.getItem();
Tessellator tessellator = Tessellator.instance;
final Tessellator tessellator = Tessellator.instance;
GL11.glPushMatrix();
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
AEColor col = ipb.getColor( item );
final AEColor col = ipb.getColor( item );
int colorValue = item.getItemDamage() >= 20 ? col.mediumVariant : col.mediumVariant;
int r = ( colorValue >> 16 ) & 0xff;
int g = ( colorValue >> 8 ) & 0xff;
int b = ( colorValue ) & 0xff;
final int colorValue = item.getItemDamage() >= 20 ? col.mediumVariant : col.mediumVariant;
final int r = ( colorValue >> 16 ) & 0xff;
final int g = ( colorValue >> 8 ) & 0xff;
final int b = ( colorValue ) & 0xff;
if( item.getItemDamage() >= 20 )
{
float fail = 0.7f;
int full = (int) ( 255 * 0.3 );
final float fail = 0.7f;
final int full = (int) ( 255 * 0.3 );
GL11.glColor4ub( (byte) ( full + r * fail ), (byte) ( full + g * fail ), (byte) ( full + b * fail ), (byte) 255 );
}
else
@@ -110,7 +110,7 @@ public class PaintBallRender implements IItemRenderer
{
GL11.glTranslatef( -0.5F, -0.3F, 0.01F );
}
float f12 = 0.0625F;
final float f12 = 0.0625F;
ItemRenderer.renderItemIn2D( tessellator, f5, f6, f4, f7, par2Icon.getIconWidth(), par2Icon.getIconHeight(), f12 );
GL11.glDisable( GL11.GL_CULL_FACE );
@@ -27,19 +27,19 @@ public class ToolBiometricCardRender implements IItemRenderer // TileEntityItemS
{
@Override
public boolean handleRenderType( ItemStack item, ItemRenderType type )
public boolean handleRenderType( final ItemStack item, final ItemRenderType type )
{
return true;
}
@Override
public boolean shouldUseRenderHelper( ItemRenderType type, ItemStack item, ItemRendererHelper helper )
public boolean shouldUseRenderHelper( final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper )
{
return helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION;
}
@Override
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
/*
TextureAtlasSprite par2Icon = item.getIconIndex();
@@ -27,19 +27,19 @@ public class ToolColorApplicatorRender implements IItemRenderer
{
@Override
public boolean handleRenderType( ItemStack item, ItemRenderType type )
public boolean handleRenderType( final ItemStack item, final ItemRenderType type )
{
return true;
}
@Override
public boolean shouldUseRenderHelper( ItemRenderType type, ItemStack item, ItemRendererHelper helper )
public boolean shouldUseRenderHelper( final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper )
{
return helper == ItemRendererHelper.ENTITY_BOBBING || helper == ItemRendererHelper.ENTITY_ROTATION;
}
@Override
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
{
/*
TextureAtlasSprite par2Icon = item.getIconIndex();
@@ -93,14 +93,14 @@ public class ModelCompass extends ModelBase
this.setRotation( this.Base, 0F, 0F, 0F );
}
private void setRotation( ModelRenderer model, float x, float y, float z )
private void setRotation( final ModelRenderer model, final float x, final float y, final float z )
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
public void renderAll( float rad )
public void renderAll( final float rad )
{
this.setRotation( this.Pointer, 0F, 0F, 0F );