final variables and parameters
seeing some methods it does actually help to enforce the parameters
This commit is contained in:
@@ -92,16 +92,16 @@ public class ClientHelper extends ServerHelper
|
||||
private static final RenderBlocks BLOCK_RENDERER = new RenderBlocks();
|
||||
|
||||
@SubscribeEvent
|
||||
public void postPlayerRender( RenderLivingEvent.Pre p )
|
||||
public void postPlayerRender( final RenderLivingEvent.Pre p )
|
||||
{
|
||||
PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||
final PlayerColor player = TickHandler.INSTANCE.getPlayerColors().get( p.entity.getEntityId() );
|
||||
if( player != null )
|
||||
{
|
||||
AEColor col = player.myColor;
|
||||
final AEColor col = player.myColor;
|
||||
|
||||
float r = 0xff & ( col.mediumVariant >> 16 );
|
||||
float g = 0xff & ( col.mediumVariant >> 8 );
|
||||
float b = 0xff & ( col.mediumVariant );
|
||||
final float r = 0xff & ( col.mediumVariant >> 16 );
|
||||
final float g = 0xff & ( col.mediumVariant >> 8 );
|
||||
final float b = 0xff & ( col.mediumVariant );
|
||||
GL11.glColor3f( r / 255.0f, g / 255.0f, b / 255.0f );
|
||||
}
|
||||
}
|
||||
@@ -126,9 +126,9 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bindTileEntitySpecialRenderer( Class tile, AEBaseBlock blk )
|
||||
public void bindTileEntitySpecialRenderer( final Class tile, final AEBaseBlock blk )
|
||||
{
|
||||
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
||||
final BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
||||
if( bbr.hasTESR() && tile != null )
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
|
||||
@@ -140,7 +140,7 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
List<EntityPlayer> o = new ArrayList<EntityPlayer>();
|
||||
final List<EntityPlayer> o = new ArrayList<EntityPlayer>();
|
||||
o.add( Minecraft.getMinecraft().thePlayer );
|
||||
return o;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawnEffect( EffectType effect, World worldObj, double posX, double posY, double posZ, Object o )
|
||||
public void spawnEffect( final EffectType effect, final World worldObj, final double posX, final double posY, final double posZ, final Object o )
|
||||
{
|
||||
if( AEConfig.instance.enableEffects )
|
||||
{
|
||||
@@ -180,34 +180,34 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnAssembler( World worldObj, double posX, double posY, double posZ, Object o )
|
||||
private void spawnAssembler( final World worldObj, final double posX, final double posY, final double posZ, final Object o )
|
||||
{
|
||||
PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
final PacketAssemblerAnimation paa = (PacketAssemblerAnimation) o;
|
||||
|
||||
AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
final AssemblerFX fx = new AssemblerFX( Minecraft.getMinecraft().theWorld, posX, posY, posZ, 0.0D, 0.0D, 0.0D, paa.rate, paa.is );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnVibrant( World w, double x, double y, double z )
|
||||
private void spawnVibrant( final World w, final double x, final double y, final double z )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( Platform.getRandom() ) )
|
||||
{
|
||||
double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
double d2 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
final double d0 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
final double d1 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
final double d2 = ( Platform.getRandomFloat() - 0.5F ) * 0.26D;
|
||||
|
||||
VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
|
||||
final VibrantFX fx = new VibrantFX( w, x + d0, y + d1, z + d2, 0.0D, 0.0D, 0.0D );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
}
|
||||
|
||||
private void spawnCrafting( World w, double posX, double posY, double posZ )
|
||||
private void spawnCrafting( final World w, final double posX, final double posY, final double posZ )
|
||||
{
|
||||
float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final CraftingFx fx = new CraftingFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
|
||||
fx.motionX = -x * 0.2;
|
||||
fx.motionY = -y * 0.2;
|
||||
@@ -216,13 +216,13 @@ public class ClientHelper extends ServerHelper
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnEnergy( World w, double posX, double posY, double posZ )
|
||||
private void spawnEnergy( final World w, final double posX, final double posY, final double posZ )
|
||||
{
|
||||
float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float x = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float y = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
final float z = (float) ( ( ( Platform.getRandomInt() % 100 ) * 0.01 ) - 0.5 ) * 0.7f;
|
||||
|
||||
EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
final EnergyFx fx = new EnergyFx( w, posX + x, posY + y, posZ + z, Items.diamond );
|
||||
|
||||
fx.motionX = -x * 0.1;
|
||||
fx.motionY = -y * 0.1;
|
||||
@@ -231,22 +231,22 @@ public class ClientHelper extends ServerHelper
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightning( World worldObj, double posX, double posY, double posZ )
|
||||
private void spawnLightning( final World worldObj, final double posX, final double posY, final double posZ )
|
||||
{
|
||||
LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
||||
final LightningFX fx = new LightningFX( worldObj, posX, posY + 0.3f, posZ, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
private void spawnLightningArc( World worldObj, double posX, double posY, double posZ, Vec3 second )
|
||||
private void spawnLightningArc( final World worldObj, final double posX, final double posY, final double posZ, final Vec3 second )
|
||||
{
|
||||
LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
final LightningFX fx = new LightningArcFX( worldObj, posX, posY, posZ, second.xCoord, second.yCoord, second.zCoord, 0.0f, 0.0f, 0.0f );
|
||||
Minecraft.getMinecraft().effectRenderer.addEffect( fx );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldAddParticles( Random r )
|
||||
public boolean shouldAddParticles( final Random r )
|
||||
{
|
||||
int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
||||
final int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
||||
if( setting == 2 )
|
||||
{
|
||||
return false;
|
||||
@@ -265,11 +265,11 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doRenderItem( ItemStack itemstack, World w )
|
||||
public void doRenderItem( final ItemStack itemstack, final World w )
|
||||
{
|
||||
if( itemstack != null )
|
||||
{
|
||||
EntityItem entityitem = new EntityItem( w, 0.0D, 0.0D, 0.0D, itemstack );
|
||||
final EntityItem entityitem = new EntityItem( w, 0.0D, 0.0D, 0.0D, itemstack );
|
||||
entityitem.getEntityItem().stackSize = 1;
|
||||
|
||||
// set all this stuff and then do shit? meh?
|
||||
@@ -290,7 +290,7 @@ public class ClientHelper extends ServerHelper
|
||||
GL11.glScalef( 1.0f, -1.0f, 0.005f );
|
||||
// GL11.glScalef( 1.0f , -1.0f, 1.0f );
|
||||
|
||||
Block block = Block.getBlockFromItem( itemstack.getItem() );
|
||||
final Block block = Block.getBlockFromItem( itemstack.getItem() );
|
||||
if( ( itemstack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d( block.getRenderType() ) ) )
|
||||
{
|
||||
GL11.glRotatef( 25.0f, 1.0f, 0.0f, 0.0f );
|
||||
@@ -298,7 +298,7 @@ public class ClientHelper extends ServerHelper
|
||||
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
|
||||
}
|
||||
|
||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, IItemRenderer.ItemRenderType.ENTITY );
|
||||
final IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, IItemRenderer.ItemRenderType.ENTITY );
|
||||
if( customRenderer != null && !( itemstack.getItem() instanceof ItemBlock ) )
|
||||
{
|
||||
if( customRenderer.shouldUseRenderHelper( IItemRenderer.ItemRenderType.ENTITY, itemstack, IItemRenderer.ItemRendererHelper.BLOCK_3D ) )
|
||||
@@ -333,7 +333,7 @@ public class ClientHelper extends ServerHelper
|
||||
GL11.glScalef( 1.0f, 1.0f, 0.005f );
|
||||
|
||||
RenderItem.renderInFrame = false;
|
||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
final FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
if( !ForgeHooksClient.renderInventoryItem( BLOCK_RENDERER, Minecraft.getMinecraft().renderEngine, itemstack, true, 0, 0, 0 ) )
|
||||
{
|
||||
ITEM_RENDERER.renderItemIntoGUI( fr, Minecraft.getMinecraft().renderEngine, itemstack, 0, 0, false );
|
||||
@@ -360,8 +360,8 @@ public class ClientHelper extends ServerHelper
|
||||
return super.getRenderMode();
|
||||
}
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
|
||||
return this.renderModeForPlayer( player );
|
||||
}
|
||||
@@ -369,19 +369,19 @@ public class ClientHelper extends ServerHelper
|
||||
@Override
|
||||
public void triggerUpdates()
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
|
||||
int x = (int) player.posX;
|
||||
int y = (int) player.posY;
|
||||
int z = (int) player.posZ;
|
||||
final int x = (int) player.posX;
|
||||
final int y = (int) player.posY;
|
||||
final int z = (int) player.posZ;
|
||||
|
||||
int range = 16 * 16;
|
||||
final int range = 16 * 16;
|
||||
|
||||
mc.theWorld.markBlockRangeForRenderUpdate( x - range, y - range, z - range, x + range, y + range, z + range );
|
||||
}
|
||||
@@ -393,16 +393,16 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void wheelEvent( MouseEvent me )
|
||||
public void wheelEvent( final MouseEvent me )
|
||||
{
|
||||
if( me.isCanceled() || me.dwheel == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
ItemStack is = player.getHeldItem();
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final ItemStack is = player.getHeldItem();
|
||||
|
||||
if( is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking() )
|
||||
{
|
||||
@@ -411,7 +411,7 @@ public class ClientHelper extends ServerHelper
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Item", me.dwheel > 0 ? "WheelUp" : "WheelDown" ) );
|
||||
me.setCanceled( true );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -419,11 +419,11 @@ public class ClientHelper extends ServerHelper
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void updateTextureSheet( TextureStitchEvent.Pre ev )
|
||||
public void updateTextureSheet( final TextureStitchEvent.Pre ev )
|
||||
{
|
||||
if( ev.map.getTextureType() == 1 )
|
||||
{
|
||||
for( ExtraItemTextures et : ExtraItemTextures.values() )
|
||||
for( final ExtraItemTextures et : ExtraItemTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
}
|
||||
@@ -431,12 +431,12 @@ public class ClientHelper extends ServerHelper
|
||||
|
||||
if( ev.map.getTextureType() == 0 )
|
||||
{
|
||||
for( ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||
for( final ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
}
|
||||
|
||||
for( CableBusTextures cb : CableBusTextures.values() )
|
||||
for( final CableBusTextures cb : CableBusTextures.values() )
|
||||
{
|
||||
cb.registerIcon( ev.map );
|
||||
}
|
||||
|
||||
@@ -96,28 +96,28 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
boolean useNEI = false;
|
||||
private boolean subGui;
|
||||
|
||||
public AEBaseGui( Container container )
|
||||
public AEBaseGui( final Container container )
|
||||
{
|
||||
super( container );
|
||||
this.subGui = switchingGuis;
|
||||
switchingGuis = false;
|
||||
}
|
||||
|
||||
protected static String join( Collection<String> toolTip, String delimiter )
|
||||
protected static String join( final Collection<String> toolTip, final String delimiter )
|
||||
{
|
||||
final Joiner joiner = Joiner.on( delimiter );
|
||||
|
||||
return joiner.join( toolTip );
|
||||
}
|
||||
|
||||
protected int getQty( GuiButton btn )
|
||||
protected int getQty( final GuiButton btn )
|
||||
{
|
||||
try
|
||||
{
|
||||
DecimalFormat df = new DecimalFormat( "+#;-#" );
|
||||
final DecimalFormat df = new DecimalFormat( "+#;-#" );
|
||||
return df.parse( btn.displayString ).intValue();
|
||||
}
|
||||
catch( ParseException e )
|
||||
catch( final ParseException e )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
super.initGui();
|
||||
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
Iterator<Slot> i = slots.iterator();
|
||||
final Iterator<Slot> i = slots.iterator();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
if( i.next() instanceof SlotME )
|
||||
@@ -143,7 +143,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
|
||||
for( InternalSlotME me : this.meSlots )
|
||||
for( final InternalSlotME me : this.meSlots )
|
||||
{
|
||||
slots.add( new SlotME( me ) );
|
||||
}
|
||||
@@ -156,22 +156,22 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen( int mouseX, int mouseY, float btn )
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
super.drawScreen( mouseX, mouseY, btn );
|
||||
|
||||
boolean hasClicked = Mouse.isButtonDown( 0 );
|
||||
final boolean hasClicked = Mouse.isButtonDown( 0 );
|
||||
if( hasClicked && this.myScrollBar != null )
|
||||
{
|
||||
this.myScrollBar.click( this, mouseX - this.guiLeft, mouseY - this.guiTop );
|
||||
}
|
||||
|
||||
for( Object c : this.buttonList )
|
||||
for( final Object c : this.buttonList )
|
||||
{
|
||||
if( c instanceof ITooltip )
|
||||
{
|
||||
ITooltip tooltip = (ITooltip) c;
|
||||
int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition;
|
||||
final ITooltip tooltip = (ITooltip) c;
|
||||
final int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition;
|
||||
int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition;
|
||||
|
||||
if( x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible() )
|
||||
@@ -183,7 +183,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
y = 15;
|
||||
}
|
||||
|
||||
String msg = tooltip.getMessage();
|
||||
final String msg = tooltip.getMessage();
|
||||
if( msg != null )
|
||||
{
|
||||
this.drawTooltip( x + 11, y + 4, 0, msg );
|
||||
@@ -194,14 +194,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
|
||||
public void drawTooltip( int par2, int par3, int forceWidth, String message )
|
||||
public void drawTooltip( final int par2, final int par3, final int forceWidth, final String message )
|
||||
{
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GL11.glDisable( GL11.GL_DEPTH_TEST );
|
||||
String[] var4 = message.split( "\n" );
|
||||
final String[] var4 = message.split( "\n" );
|
||||
|
||||
if( var4.length > 0 )
|
||||
{
|
||||
@@ -240,14 +240,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
this.zLevel = 300.0F;
|
||||
itemRender.zLevel = 300.0F;
|
||||
int var10 = -267386864;
|
||||
final int var10 = -267386864;
|
||||
this.drawGradientRect( var6 - 3, var7 - 4, var6 + var5 + 3, var7 - 3, var10, var10 );
|
||||
this.drawGradientRect( var6 - 3, var7 + var9 + 3, var6 + var5 + 3, var7 + var9 + 4, var10, var10 );
|
||||
this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 + var9 + 3, var10, var10 );
|
||||
this.drawGradientRect( var6 - 4, var7 - 3, var6 - 3, var7 + var9 + 3, var10, var10 );
|
||||
this.drawGradientRect( var6 + var5 + 3, var7 - 3, var6 + var5 + 4, var7 + var9 + 3, var10, var10 );
|
||||
int var11 = 1347420415;
|
||||
int var12 = ( var11 & 16711422 ) >> 1 | var11 & -16777216;
|
||||
final int var11 = 1347420415;
|
||||
final int var12 = ( var11 & 16711422 ) >> 1 | var11 & -16777216;
|
||||
this.drawGradientRect( var6 - 3, var7 - 3 + 1, var6 - 3 + 1, var7 + var9 + 3 - 1, var11, var12 );
|
||||
this.drawGradientRect( var6 + var5 + 2, var7 - 3 + 1, var6 + var5 + 3, var7 + var9 + 3 - 1, var11, var12 );
|
||||
this.drawGradientRect( var6 - 3, var7 - 3, var6 + var5 + 3, var7 - 3 + 1, var11, var11 );
|
||||
@@ -283,10 +283,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void drawGuiContainerForegroundLayer( int x, int y )
|
||||
protected final void drawGuiContainerForegroundLayer( final int x, final int y )
|
||||
{
|
||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
int oy = this.guiTop; // (height - ySize) / 2;
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
if( this.myScrollBar != null )
|
||||
@@ -300,19 +300,19 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
public abstract void drawFG( int offsetX, int offsetY, int mouseX, int mouseY );
|
||||
|
||||
@Override
|
||||
protected final void drawGuiContainerBackgroundLayer( float f, int x, int y )
|
||||
protected final void drawGuiContainerBackgroundLayer( final float f, final int x, final int y )
|
||||
{
|
||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
int oy = this.guiTop; // (height - ySize) / 2;
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
this.drawBG( ox, oy, x, y );
|
||||
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for( Slot slot : slots )
|
||||
for( final Slot slot : slots )
|
||||
{
|
||||
if( slot instanceof OptionalSlotFake )
|
||||
{
|
||||
OptionalSlotFake fs = (OptionalSlotFake) slot;
|
||||
final OptionalSlotFake fs = (OptionalSlotFake) slot;
|
||||
if( fs.renderDisabled() )
|
||||
{
|
||||
if( fs.isEnabled() )
|
||||
@@ -334,15 +334,15 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( final int xCoord, final int yCoord, final int btn )
|
||||
{
|
||||
this.drag_click.clear();
|
||||
|
||||
if( btn == 1 )
|
||||
{
|
||||
for( Object o : this.buttonList )
|
||||
for( final Object o : this.buttonList )
|
||||
{
|
||||
GuiButton guibutton = (GuiButton) o;
|
||||
final GuiButton guibutton = (GuiButton) o;
|
||||
if( guibutton.mousePressed( this.mc, xCoord, yCoord ) )
|
||||
{
|
||||
super.mouseClicked( xCoord, yCoord, 0 );
|
||||
@@ -355,19 +355,19 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClickMove( int x, int y, int c, long d )
|
||||
protected void mouseClickMove( final int x, final int y, final int c, final long d )
|
||||
{
|
||||
Slot slot = this.getSlot( x, y );
|
||||
ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
final Slot slot = this.getSlot( x, y );
|
||||
final ItemStack itemstack = this.mc.thePlayer.inventory.getItemStack();
|
||||
|
||||
if( slot instanceof SlotFake && itemstack != null )
|
||||
{
|
||||
this.drag_click.add( slot );
|
||||
if( this.drag_click.size() > 1 )
|
||||
{
|
||||
for( Slot dr : this.drag_click )
|
||||
for( final Slot dr : this.drag_click )
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE, dr.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
@@ -379,9 +379,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleMouseClick( Slot slot, int slotIdx, int ctrlDown, int key )
|
||||
protected void handleMouseClick( final Slot slot, final int slotIdx, final int ctrlDown, final int key )
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
|
||||
if( slot instanceof SlotFake )
|
||||
{
|
||||
@@ -392,7 +392,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return;
|
||||
}
|
||||
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
|
||||
return;
|
||||
@@ -409,7 +409,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( ( (SlotPatternTerm) slot ).getRequest( key == 1 ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -431,7 +431,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
}
|
||||
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
|
||||
return;
|
||||
@@ -455,7 +455,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
return;
|
||||
}
|
||||
@@ -490,7 +490,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if( action != null )
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ( (SlotDisconnected) slot ).mySlot.id );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, slot.getSlotIndex(), ( (SlotDisconnected) slot ).mySlot.id );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
|
||||
@@ -528,7 +528,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
else if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
|
||||
final IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
|
||||
if( slotItem != null )
|
||||
{
|
||||
action = InventoryAction.CREATIVE_DUPLICATE;
|
||||
@@ -544,7 +544,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if( action != null )
|
||||
{
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
|
||||
@@ -574,7 +574,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
// a replica of the weird broken vanilla feature.
|
||||
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for( Slot inventorySlot : slots )
|
||||
for( final Slot inventorySlot : slots )
|
||||
{
|
||||
if( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack() && inventorySlot.inventory == slot.inventory && Container.func_94527_a( inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
@@ -590,15 +590,15 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkHotbarKeys( int keyCode )
|
||||
protected boolean checkHotbarKeys( final int keyCode )
|
||||
{
|
||||
Slot theSlot;
|
||||
final Slot theSlot;
|
||||
|
||||
try
|
||||
{
|
||||
theSlot = ObfuscationReflectionHelper.getPrivateValue( GuiContainer.class, this, "theSlot", "field_147006_u", "f" );
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -610,7 +610,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if( keyCode == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
|
||||
{
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for( Slot s : slots )
|
||||
for( final Slot s : slots )
|
||||
{
|
||||
if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() )
|
||||
{
|
||||
@@ -628,7 +628,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
else
|
||||
{
|
||||
for( Slot s : slots )
|
||||
for( final Slot s : slots )
|
||||
{
|
||||
if( s.getSlotIndex() == j && s.inventory == ( (AEBaseContainer) this.inventorySlots ).getPlayerInv() )
|
||||
{
|
||||
@@ -651,10 +651,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
|
||||
}
|
||||
|
||||
protected Slot getSlot( int mouseX, int mouseY )
|
||||
protected Slot getSlot( final int mouseX, final int mouseY )
|
||||
{
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for( Slot slot : slots )
|
||||
for( final Slot slot : slots )
|
||||
{
|
||||
// isPointInRegion
|
||||
if( this.func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
@@ -673,11 +673,11 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
super.handleMouseInput();
|
||||
|
||||
int i = Mouse.getEventDWheel();
|
||||
final int i = Mouse.getEventDWheel();
|
||||
if( i != 0 && isShiftKeyDown() )
|
||||
{
|
||||
int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
|
||||
int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
|
||||
final int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
|
||||
final int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
|
||||
this.mouseWheelEvent( x, y, i / Math.abs( i ) );
|
||||
}
|
||||
else if( i != 0 && this.myScrollBar != null )
|
||||
@@ -686,21 +686,21 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
|
||||
protected void mouseWheelEvent( int x, int y, int wheel )
|
||||
protected void mouseWheelEvent( final int x, final int y, final int wheel )
|
||||
{
|
||||
Slot slot = this.getSlot( x, y );
|
||||
final Slot slot = this.getSlot( x, y );
|
||||
if( slot instanceof SlotME )
|
||||
{
|
||||
IAEItemStack item = ( (SlotME) slot ).getAEStack();
|
||||
final IAEItemStack item = ( (SlotME) slot ).getAEStack();
|
||||
if( item != null )
|
||||
{
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( item );
|
||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
||||
int times = Math.abs( wheel );
|
||||
final InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
||||
final int times = Math.abs( wheel );
|
||||
final int inventorySize = this.getInventorySlots().size();
|
||||
for( int h = 0; h < times; h++ )
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( direction, inventorySize, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( direction, inventorySize, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
@@ -712,13 +712,13 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return true;
|
||||
}
|
||||
|
||||
public void bindTexture( String base, String file )
|
||||
public void bindTexture( final String base, final String file )
|
||||
{
|
||||
ResourceLocation loc = new ResourceLocation( base, "textures/" + file );
|
||||
final ResourceLocation loc = new ResourceLocation( base, "textures/" + file );
|
||||
this.mc.getTextureManager().bindTexture( loc );
|
||||
}
|
||||
|
||||
protected void drawItem( int x, int y, ItemStack is )
|
||||
protected void drawItem( final int x, final int y, final ItemStack is )
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
itemRender.zLevel = 100.0F;
|
||||
@@ -735,7 +735,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.zLevel = 0.0F;
|
||||
}
|
||||
|
||||
protected String getGuiDisplayName( String in )
|
||||
protected String getGuiDisplayName( final String in )
|
||||
{
|
||||
return this.hasCustomInventoryName() ? this.getInventoryName() : in;
|
||||
}
|
||||
@@ -754,16 +754,16 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return ( (AEBaseContainer) this.inventorySlots ).customName;
|
||||
}
|
||||
|
||||
public void a( Slot s )
|
||||
public void a( final Slot s )
|
||||
{
|
||||
this.drawSlot( s );
|
||||
}
|
||||
|
||||
public void drawSlot( Slot s )
|
||||
public void drawSlot( final Slot s )
|
||||
{
|
||||
if( s instanceof SlotME )
|
||||
{
|
||||
RenderItem pIR = this.setItemRender( this.aeRenderItem );
|
||||
final RenderItem pIR = this.setItemRender( this.aeRenderItem );
|
||||
try
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
@@ -783,7 +783,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
|
||||
}
|
||||
@@ -794,45 +794,45 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
try
|
||||
{
|
||||
ItemStack is = s.getStack();
|
||||
final ItemStack is = s.getStack();
|
||||
if( s instanceof AppEngSlot && ( ( (AppEngSlot) s ).renderIconWithItem() || is == null ) && ( ( (AppEngSlot) s ).shouldDisplay() ) )
|
||||
{
|
||||
AppEngSlot aes = (AppEngSlot) s;
|
||||
final AppEngSlot aes = (AppEngSlot) s;
|
||||
if( aes.getIcon() >= 0 )
|
||||
{
|
||||
this.bindTexture( "guis/states.png" );
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
try
|
||||
{
|
||||
int uv_y = (int) Math.floor( aes.getIcon() / 16 );
|
||||
int uv_x = aes.getIcon() - uv_y * 16;
|
||||
final int uv_y = (int) Math.floor( aes.getIcon() / 16 );
|
||||
final int uv_x = aes.getIcon() - uv_y * 16;
|
||||
|
||||
GL11.glEnable( GL11.GL_BLEND );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL11.GL_TEXTURE_2D );
|
||||
GL11.glBlendFunc( GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
float par1 = aes.xDisplayPosition;
|
||||
float par2 = aes.yDisplayPosition;
|
||||
float par3 = uv_x * 16;
|
||||
float par4 = uv_y * 16;
|
||||
final float par1 = aes.xDisplayPosition;
|
||||
final float par2 = aes.yDisplayPosition;
|
||||
final float par3 = uv_x * 16;
|
||||
final float par4 = uv_y * 16;
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
|
||||
float f1 = 0.00390625F;
|
||||
float f = 0.00390625F;
|
||||
float par6 = 16;
|
||||
final float f1 = 0.00390625F;
|
||||
final float f = 0.00390625F;
|
||||
final float par6 = 16;
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + par6, this.zLevel, ( par3 + 0 ) * f, ( par4 + par6 ) * f1 );
|
||||
float par5 = 16;
|
||||
final float par5 = 16;
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + par6, this.zLevel, ( par3 + par5 ) * f, ( par4 + par6 ) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + par5, par2 + 0, this.zLevel, ( par3 + par5 ) * f, ( par4 + 0 ) * f1 );
|
||||
tessellator.addVertexWithUV( par1 + 0, par2 + 0, this.zLevel, ( par3 + 0 ) * f, ( par4 + 0 ) * f1 );
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
tessellator.draw();
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
@@ -850,7 +850,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
isValid = ( (SlotRestrictedInput) s ).isValid( is, this.mc.theWorld );
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
AELog.error( err );
|
||||
}
|
||||
@@ -884,7 +884,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
return;
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
|
||||
}
|
||||
@@ -893,7 +893,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
|
||||
private RenderItem setItemRender( RenderItem item )
|
||||
private RenderItem setItemRender( final RenderItem item )
|
||||
{
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI ) )
|
||||
{
|
||||
@@ -901,7 +901,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderItem ri = itemRender;
|
||||
final RenderItem ri = itemRender;
|
||||
itemRender = item;
|
||||
return ri;
|
||||
}
|
||||
@@ -912,24 +912,24 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return true;
|
||||
}
|
||||
|
||||
private void safeDrawSlot( Slot s )
|
||||
private void safeDrawSlot( final Slot s )
|
||||
{
|
||||
try
|
||||
{
|
||||
GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s );
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public void bindTexture( String file )
|
||||
public void bindTexture( final String file )
|
||||
{
|
||||
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/" + file );
|
||||
final ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/" + file );
|
||||
this.mc.getTextureManager().bindTexture( loc );
|
||||
}
|
||||
|
||||
public void func_146977_a( Slot s )
|
||||
public void func_146977_a( final Slot s )
|
||||
{
|
||||
this.drawSlot( s );
|
||||
}
|
||||
|
||||
@@ -36,28 +36,28 @@ import appeng.core.localization.ButtonToolTips;
|
||||
public abstract class AEBaseMEGui extends AEBaseGui
|
||||
{
|
||||
|
||||
public AEBaseMEGui( Container container )
|
||||
public AEBaseMEGui( final Container container )
|
||||
{
|
||||
super( container );
|
||||
}
|
||||
|
||||
public List<String> handleItemTooltip( ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip )
|
||||
public List<String> handleItemTooltip( final ItemStack stack, final int mouseX, final int mouseY, final List<String> currentToolTip )
|
||||
{
|
||||
if( stack != null )
|
||||
{
|
||||
Slot s = this.getSlot( mouseX, mouseY );
|
||||
final Slot s = this.getSlot( mouseX, mouseY );
|
||||
if( s instanceof SlotME )
|
||||
{
|
||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
|
||||
IAEItemStack myStack = null;
|
||||
|
||||
try
|
||||
{
|
||||
SlotME theSlotField = (SlotME) s;
|
||||
final SlotME theSlotField = (SlotME) s;
|
||||
myStack = theSlotField.getAEStack();
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -97,28 +97,28 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
// Vanilla version...
|
||||
// protected void drawItemStackTooltip(ItemStack stack, int x, int y)
|
||||
@Override
|
||||
protected void renderToolTip( ItemStack stack, int x, int y )
|
||||
protected void renderToolTip( final ItemStack stack, final int x, final int y )
|
||||
{
|
||||
Slot s = this.getSlot( x, y );
|
||||
final Slot s = this.getSlot( x, y );
|
||||
if( s instanceof SlotME && stack != null )
|
||||
{
|
||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
final int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
|
||||
IAEItemStack myStack = null;
|
||||
|
||||
try
|
||||
{
|
||||
SlotME theSlotField = (SlotME) s;
|
||||
final SlotME theSlotField = (SlotME) s;
|
||||
myStack = theSlotField.getAEStack();
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
}
|
||||
|
||||
if( myStack != null )
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
final List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||
{
|
||||
@@ -134,7 +134,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
}
|
||||
else if( stack.stackSize > BigNumber )
|
||||
{
|
||||
List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
final List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
this.drawTooltip( x, y, 0, join( var4, "\n" ) );
|
||||
return;
|
||||
|
||||
@@ -25,18 +25,18 @@ import net.minecraft.inventory.Container;
|
||||
public class GuiNull extends AEBaseGui
|
||||
{
|
||||
|
||||
public GuiNull( Container container )
|
||||
public GuiNull( final Container container )
|
||||
{
|
||||
super( container );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -36,16 +36,16 @@ import appeng.core.AppEng;
|
||||
public class AEConfigGui extends GuiConfig
|
||||
{
|
||||
|
||||
public AEConfigGui( GuiScreen parent )
|
||||
public AEConfigGui( final GuiScreen parent )
|
||||
{
|
||||
super( parent, getConfigElements(), AppEng.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath( AEConfig.instance.getFilePath() ) );
|
||||
}
|
||||
|
||||
private static List<IConfigElement> getConfigElements()
|
||||
{
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
final List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
||||
for( String cat : AEConfig.instance.getCategoryNames() )
|
||||
for( final String cat : AEConfig.instance.getCategoryNames() )
|
||||
{
|
||||
if( cat.equals( "versionchecker" ) )
|
||||
{
|
||||
@@ -57,14 +57,14 @@ public class AEConfigGui extends GuiConfig
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigCategory cc = AEConfig.instance.getCategory( cat );
|
||||
final ConfigCategory cc = AEConfig.instance.getCategory( cat );
|
||||
|
||||
if( cc.isChild() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigElement ce = new ConfigElement( cc );
|
||||
final ConfigElement ce = new ConfigElement( cc );
|
||||
list.add( ce );
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class AEConfigGuiFactory implements IModGuiFactory
|
||||
{
|
||||
|
||||
@Override
|
||||
public void initialize( Minecraft minecraftInstance )
|
||||
public void initialize( final Minecraft minecraftInstance )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class AEConfigGuiFactory implements IModGuiFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor( RuntimeOptionCategoryElement element )
|
||||
public RuntimeOptionGuiHandler getHandlerFor( final RuntimeOptionCategoryElement element )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
GuiImgButton partition;
|
||||
GuiToggleButton copyMode;
|
||||
|
||||
public GuiCellWorkbench( InventoryPlayer inventoryPlayer, TileCellWorkbench te )
|
||||
public GuiCellWorkbench( final InventoryPlayer inventoryPlayer, final TileCellWorkbench te )
|
||||
{
|
||||
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
|
||||
this.workbench = (ContainerCellWorkbench) this.inventorySlots;
|
||||
@@ -77,7 +77,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.handleButtonVisibility();
|
||||
|
||||
@@ -95,7 +95,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + 8 * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + ( 7 + ( 8 ) * 18 ), 177, 151, 35, 7 );
|
||||
|
||||
int dx = this.workbench.availableUpgrades() - 8;
|
||||
final int dx = this.workbench.availableUpgrades() - 8;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if( dx == 8 )
|
||||
{
|
||||
@@ -114,7 +114,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + 8 * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( 8 ) * 18 ), 186, 151, 35 - 8, 7 );
|
||||
|
||||
int dx = this.workbench.availableUpgrades() - 16;
|
||||
final int dx = this.workbench.availableUpgrades() - 16;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if( dx == 8 )
|
||||
{
|
||||
@@ -138,10 +138,10 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
this.copyMode.setState( this.workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||
|
||||
boolean hasFuzzy = false;
|
||||
IInventory inv = this.workbench.getCellUpgradeInventory();
|
||||
final IInventory inv = this.workbench.getCellUpgradeInventory();
|
||||
for( int x = 0; x < inv.getSizeInventory(); x++ )
|
||||
{
|
||||
ItemStack is = inv.getStackInSlot( x );
|
||||
final ItemStack is = inv.getStackInSlot( x );
|
||||
if( is != null && is.getItem() instanceof IUpgradeModule )
|
||||
{
|
||||
if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY )
|
||||
@@ -172,7 +172,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -190,7 +190,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
}
|
||||
else if( btn == this.fuzzyMode )
|
||||
{
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
FuzzyMode fz = (FuzzyMode) this.fuzzyMode.getCurrentValue();
|
||||
fz = Platform.rotateEnum( fz, backwards, Settings.FUZZY_MODE.getPossibleValues() );
|
||||
@@ -202,7 +202,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
super.actionPerformed( btn );
|
||||
}
|
||||
}
|
||||
catch( IOException ignored )
|
||||
catch( final IOException ignored )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,14 +37,14 @@ public class GuiChest extends AEBaseGui
|
||||
|
||||
GuiTabButton priority;
|
||||
|
||||
public GuiChest( InventoryPlayer inventoryPlayer, TileChest te )
|
||||
public GuiChest( final InventoryPlayer inventoryPlayer, final TileChest te )
|
||||
{
|
||||
super( new ContainerChest( inventoryPlayer, te ) );
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton par1GuiButton )
|
||||
protected void actionPerformed( final GuiButton par1GuiButton )
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
@@ -63,14 +63,14 @@ public class GuiChest extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -43,7 +43,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
GuiProgressBar pb;
|
||||
GuiImgButton mode;
|
||||
|
||||
public GuiCondenser( InventoryPlayer inventoryPlayer, TileCondenser te )
|
||||
public GuiCondenser( final InventoryPlayer inventoryPlayer, final TileCondenser te )
|
||||
{
|
||||
super( new ContainerCondenser( inventoryPlayer, te ) );
|
||||
this.cvc = (ContainerCondenser) this.inventorySlots;
|
||||
@@ -51,11 +51,11 @@ public class GuiCondenser extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( this.mode == btn )
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -87,7 +87,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/condenser.png" );
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
private GuiBridge originalGui;
|
||||
|
||||
@Reflected
|
||||
public GuiCraftAmount( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiCraftAmount( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerCraftAmount( inventoryPlayer, te ) );
|
||||
}
|
||||
@@ -74,10 +74,10 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
int a = AEConfig.instance.craftItemsByStackAmounts( 0 );
|
||||
int b = AEConfig.instance.craftItemsByStackAmounts( 1 );
|
||||
int c = AEConfig.instance.craftItemsByStackAmounts( 2 );
|
||||
int d = AEConfig.instance.craftItemsByStackAmounts( 3 );
|
||||
final int a = AEConfig.instance.craftItemsByStackAmounts( 0 );
|
||||
final int b = AEConfig.instance.craftItemsByStackAmounts( 1 );
|
||||
final int c = AEConfig.instance.craftItemsByStackAmounts( 2 );
|
||||
final int d = AEConfig.instance.craftItemsByStackAmounts( 3 );
|
||||
|
||||
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) );
|
||||
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) );
|
||||
@@ -92,13 +92,13 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
this.buttonList.add( this.next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) );
|
||||
|
||||
ItemStack myIcon = null;
|
||||
Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
|
||||
final Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IParts parts = definitions.parts();
|
||||
|
||||
if( target instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
for( ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = wirelessTerminalStack;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
|
||||
if( target instanceof PartTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = stack;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
|
||||
if( target instanceof PartCraftingTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = stack;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
|
||||
if( target instanceof PartPatternTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = stack;
|
||||
}
|
||||
@@ -148,13 +148,13 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
|
||||
|
||||
@@ -166,7 +166,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
Long.parseLong( this.amountToCraft.getText() );
|
||||
this.next.enabled = this.amountToCraft.getText().length() > 0;
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
this.next.enabled = false;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -206,13 +206,13 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
out = "0";
|
||||
}
|
||||
|
||||
long result = Long.parseLong( out );
|
||||
final long result = Long.parseLong( out );
|
||||
if( result < 0 )
|
||||
{
|
||||
this.amountToCraft.setText( "1" );
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
// :P
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -242,14 +242,14 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
NetworkHandler.instance.sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), isShiftKeyDown() ) );
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
// nope..
|
||||
this.amountToCraft.setText( "1" );
|
||||
}
|
||||
|
||||
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
final boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
final boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
@@ -257,7 +257,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( int i )
|
||||
private void addQty( final int i )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -297,7 +297,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
Integer.parseInt( out );
|
||||
this.amountToCraft.setText( out );
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
// :P
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
GuiButton selectCPU;
|
||||
int tooltip = -1;
|
||||
|
||||
public GuiCraftConfirm( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiCraftConfirm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerCraftConfirm( inventoryPlayer, te ) );
|
||||
this.xSize = 238;
|
||||
@@ -131,25 +131,25 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen( int mouseX, int mouseY, float btn )
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
this.updateCPUButtonText();
|
||||
|
||||
this.start.enabled = !( this.ccc.noCPU || this.isSimulation() );
|
||||
this.selectCPU.enabled = !this.isSimulation();
|
||||
|
||||
int gx = ( this.width - this.xSize ) / 2;
|
||||
int gy = ( this.height - this.ySize ) / 2;
|
||||
final int gx = ( this.width - this.xSize ) / 2;
|
||||
final int gy = ( this.height - this.ySize ) / 2;
|
||||
|
||||
this.tooltip = -1;
|
||||
|
||||
int offY = 23;
|
||||
final int offY = 23;
|
||||
int y = 0;
|
||||
int x = 0;
|
||||
for( int z = 0; z <= 4 * 5; z++ )
|
||||
{
|
||||
int minX = gx + 9 + x * 67;
|
||||
int minY = gy + 22 + y * offY;
|
||||
final int minX = gx + 9 + x * 67;
|
||||
final int minY = gy + 22 + y * offY;
|
||||
|
||||
if( minX < mouseX && minX + 67 > mouseX )
|
||||
{
|
||||
@@ -179,7 +179,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
if( this.ccc.myName.length() > 0 )
|
||||
{
|
||||
String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
|
||||
final String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
@@ -202,11 +202,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
long BytesUsed = this.ccc.bytesUsed;
|
||||
String byteUsed = NumberFormat.getInstance().format( BytesUsed );
|
||||
String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal();
|
||||
final long BytesUsed = this.ccc.bytesUsed;
|
||||
final String byteUsed = NumberFormat.getInstance().format( BytesUsed );
|
||||
final String Add = BytesUsed > 0 ? ( byteUsed + ' ' + GuiText.BytesUsed.getLocal() ) : GuiText.CalculatingWait.getLocal();
|
||||
this.fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
|
||||
|
||||
String dsp = null;
|
||||
@@ -220,36 +220,36 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
|
||||
}
|
||||
|
||||
int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
|
||||
final int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
|
||||
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
||||
|
||||
int sectionLength = 67;
|
||||
final int sectionLength = 67;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int xo = 9;
|
||||
int yo = 22;
|
||||
int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
||||
int viewEnd = viewStart + 3 * this.rows;
|
||||
final int xo = 9;
|
||||
final int yo = 22;
|
||||
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
||||
final int viewEnd = viewStart + 3 * this.rows;
|
||||
|
||||
String dspToolTip = "";
|
||||
List<String> lineList = new LinkedList<String>();
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
int offY = 23;
|
||||
final int offY = 23;
|
||||
|
||||
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
|
||||
{
|
||||
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
final IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
if( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScaled( 0.5, 0.5, 0.5 );
|
||||
|
||||
IAEItemStack stored = this.storage.findPrecise( refStack );
|
||||
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||
IAEItemStack missingStack = this.missing.findPrecise( refStack );
|
||||
final IAEItemStack stored = this.storage.findPrecise( refStack );
|
||||
final IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||
final IAEItemStack missingStack = this.missing.findPrecise( refStack );
|
||||
|
||||
int lines = 0;
|
||||
|
||||
@@ -266,7 +266,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
lines++;
|
||||
}
|
||||
|
||||
int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||
final int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||
int downY = 0;
|
||||
|
||||
if( stored != null && stored.getStackSize() > 0 )
|
||||
@@ -282,7 +282,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
final int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
@@ -307,7 +307,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
str = GuiText.Missing.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
final int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
@@ -332,7 +332,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
final int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
@@ -342,10 +342,10 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
|
||||
int posY = y * offY + yo;
|
||||
final int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
|
||||
final int posY = y * offY + yo;
|
||||
|
||||
ItemStack is = refStack.copy().getItemStack();
|
||||
final ItemStack is = refStack.copy().getItemStack();
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -364,8 +364,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
if( red )
|
||||
{
|
||||
int startX = x * ( 1 + sectionLength ) + xo;
|
||||
int startY = posY - 4;
|
||||
final int startX = x * ( 1 + sectionLength ) + xo;
|
||||
final int startY = posY - 4;
|
||||
drawRect( startX, startY, startX + sectionLength, startY + offY, 0x1AFF0000 );
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.setScrollBar();
|
||||
this.bindTexture( "guis/craftingreport.png" );
|
||||
@@ -397,41 +397,41 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = this.visual.size();
|
||||
final int size = this.visual.size();
|
||||
|
||||
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 );
|
||||
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
|
||||
}
|
||||
|
||||
public void postUpdate( List<IAEItemStack> list, byte ref )
|
||||
public void postUpdate( final List<IAEItemStack> list, final byte ref )
|
||||
{
|
||||
switch( ref )
|
||||
{
|
||||
case 0:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.storage, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.pending, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.missing, l );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
long amt = this.getTotal( l );
|
||||
final long amt = this.getTotal( l );
|
||||
|
||||
if( amt <= 0 )
|
||||
{
|
||||
@@ -439,7 +439,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
else
|
||||
{
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
final IAEItemStack is = this.findVisualStack( l );
|
||||
is.setStackSize( amt );
|
||||
}
|
||||
}
|
||||
@@ -447,7 +447,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void handleInput( IItemList<IAEItemStack> s, IAEItemStack l )
|
||||
private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
|
||||
{
|
||||
IAEItemStack a = s.findPrecise( l );
|
||||
|
||||
@@ -473,11 +473,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
private long getTotal( IAEItemStack is )
|
||||
private long getTotal( final IAEItemStack is )
|
||||
{
|
||||
IAEItemStack a = this.storage.findPrecise( is );
|
||||
IAEItemStack c = this.pending.findPrecise( is );
|
||||
IAEItemStack m = this.missing.findPrecise( is );
|
||||
final IAEItemStack a = this.storage.findPrecise( is );
|
||||
final IAEItemStack c = this.pending.findPrecise( is );
|
||||
final IAEItemStack m = this.missing.findPrecise( is );
|
||||
|
||||
long total = 0;
|
||||
|
||||
@@ -499,12 +499,12 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
return total;
|
||||
}
|
||||
|
||||
private void deleteVisualStack( IAEItemStack l )
|
||||
private void deleteVisualStack( final IAEItemStack l )
|
||||
{
|
||||
Iterator<IAEItemStack> i = this.visual.iterator();
|
||||
final Iterator<IAEItemStack> i = this.visual.iterator();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
final IAEItemStack o = i.next();
|
||||
if( o.equals( l ) )
|
||||
{
|
||||
i.remove();
|
||||
@@ -513,9 +513,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
private IAEItemStack findVisualStack( IAEItemStack l )
|
||||
private IAEItemStack findVisualStack( final IAEItemStack l )
|
||||
{
|
||||
for( IAEItemStack o : this.visual )
|
||||
for( final IAEItemStack o : this.visual )
|
||||
{
|
||||
if( o.equals( l ) )
|
||||
{
|
||||
@@ -523,13 +523,13 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
IAEItemStack stack = l.copy();
|
||||
final IAEItemStack stack = l.copy();
|
||||
this.visual.add( stack );
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -542,11 +542,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.selectCPU )
|
||||
{
|
||||
@@ -554,7 +554,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -571,7 +571,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Start", "Start" ) );
|
||||
}
|
||||
catch( Throwable e )
|
||||
catch( final Throwable e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
@@ -92,12 +92,12 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
private GuiButton cancel;
|
||||
private int tooltip = -1;
|
||||
|
||||
public GuiCraftingCPU( InventoryPlayer inventoryPlayer, Object te )
|
||||
public GuiCraftingCPU( final InventoryPlayer inventoryPlayer, final Object te )
|
||||
{
|
||||
this( new ContainerCraftingCPU( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
protected GuiCraftingCPU( ContainerCraftingCPU container )
|
||||
protected GuiCraftingCPU( final ContainerCraftingCPU container )
|
||||
{
|
||||
super( container );
|
||||
this.craftingCpu = container;
|
||||
@@ -115,7 +115,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -125,7 +125,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "TileCrafting.Cancel", "Cancel" ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -143,14 +143,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = this.visual.size();
|
||||
final int size = this.visual.size();
|
||||
|
||||
this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
|
||||
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen( int mouseX, int mouseY, float btn )
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
this.cancel.enabled = !this.visual.isEmpty();
|
||||
|
||||
@@ -164,8 +164,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
int x = 0;
|
||||
for( int z = 0; z <= 4 * 5; z++ )
|
||||
{
|
||||
int minX = gx + 9 + x * 67;
|
||||
int minY = gy + 22 + y * offY;
|
||||
final int minX = gx + 9 + x * 67;
|
||||
final int minY = gy + 22 + y * offY;
|
||||
|
||||
if( minX < mouseX && minX + 67 > mouseX )
|
||||
{
|
||||
@@ -189,7 +189,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
|
||||
|
||||
@@ -208,16 +208,16 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
final int viewEnd = viewStart + 3 * 6;
|
||||
|
||||
String dspToolTip = "";
|
||||
List<String> lineList = new LinkedList<String>();
|
||||
final List<String> lineList = new LinkedList<String>();
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
int offY = 23;
|
||||
final int offY = 23;
|
||||
|
||||
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
|
||||
for( int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++ )
|
||||
{
|
||||
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
final IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
if( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
@@ -248,19 +248,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
if( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) )
|
||||
{
|
||||
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA;
|
||||
int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
|
||||
int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
|
||||
final int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA;
|
||||
final int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
|
||||
final int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
|
||||
drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
|
||||
}
|
||||
|
||||
int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||
final int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||
int downY = 0;
|
||||
|
||||
if( stored != null && stored.getStackSize() > 0 )
|
||||
{
|
||||
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
final int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
@@ -300,10 +300,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
|
||||
int posY = y * offY + ITEMSTACK_TOP_OFFSET;
|
||||
final int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
|
||||
final int posY = y * offY + ITEMSTACK_TOP_OFFSET;
|
||||
|
||||
ItemStack is = refStack.copy().getItemStack();
|
||||
final ItemStack is = refStack.copy().getItemStack();
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -339,41 +339,41 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/craftingcpu.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
public void postUpdate( List<IAEItemStack> list, byte ref )
|
||||
public void postUpdate( final List<IAEItemStack> list, final byte ref )
|
||||
{
|
||||
switch( ref )
|
||||
{
|
||||
case 0:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.storage, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.active, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.pending, l );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
for( IAEItemStack l : list )
|
||||
for( final IAEItemStack l : list )
|
||||
{
|
||||
long amt = this.getTotal( l );
|
||||
final long amt = this.getTotal( l );
|
||||
|
||||
if( amt <= 0 )
|
||||
{
|
||||
@@ -381,7 +381,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
else
|
||||
{
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
final IAEItemStack is = this.findVisualStack( l );
|
||||
is.setStackSize( amt );
|
||||
}
|
||||
}
|
||||
@@ -389,7 +389,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void handleInput( IItemList<IAEItemStack> s, IAEItemStack l )
|
||||
private void handleInput( final IItemList<IAEItemStack> s, final IAEItemStack l )
|
||||
{
|
||||
IAEItemStack a = s.findPrecise( l );
|
||||
|
||||
@@ -415,7 +415,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
}
|
||||
|
||||
private long getTotal( IAEItemStack is )
|
||||
private long getTotal( final IAEItemStack is )
|
||||
{
|
||||
final IAEItemStack a = this.storage.findPrecise( is );
|
||||
final IAEItemStack b = this.active.findPrecise( is );
|
||||
@@ -441,13 +441,13 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
return total;
|
||||
}
|
||||
|
||||
private void deleteVisualStack( IAEItemStack l )
|
||||
private void deleteVisualStack( final IAEItemStack l )
|
||||
{
|
||||
final Iterator<IAEItemStack> i = this.visual.iterator();
|
||||
|
||||
while( i.hasNext() )
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
final IAEItemStack o = i.next();
|
||||
if( o.equals( l ) )
|
||||
{
|
||||
i.remove();
|
||||
@@ -456,9 +456,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
}
|
||||
|
||||
private IAEItemStack findVisualStack( IAEItemStack l )
|
||||
private IAEItemStack findVisualStack( final IAEItemStack l )
|
||||
{
|
||||
for( IAEItemStack o : this.visual )
|
||||
for( final IAEItemStack o : this.visual )
|
||||
{
|
||||
if( o.equals( l ) )
|
||||
{
|
||||
|
||||
@@ -59,18 +59,18 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
GuiBridge originalGui;
|
||||
ItemStack myIcon = null;
|
||||
|
||||
public GuiCraftingStatus( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiCraftingStatus( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( new ContainerCraftingStatus( inventoryPlayer, te ) );
|
||||
|
||||
this.status = (ContainerCraftingStatus) this.inventorySlots;
|
||||
Object target = this.status.getTarget();
|
||||
final Object target = this.status.getTarget();
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IParts parts = definitions.parts();
|
||||
|
||||
if( target instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
for( ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack wirelessTerminalStack : definitions.items().wirelessTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.myIcon = wirelessTerminalStack;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
|
||||
if( target instanceof PartTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.terminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.myIcon = stack;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
|
||||
if( target instanceof PartCraftingTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.craftingTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.myIcon = stack;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
|
||||
if( target instanceof PartPatternTerminal )
|
||||
{
|
||||
for( ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack stack : parts.patternTerminal().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.myIcon = stack;
|
||||
}
|
||||
@@ -107,11 +107,11 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.selectCPU )
|
||||
{
|
||||
@@ -119,7 +119,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "Terminal.Cpu", backwards ? "Prev" : "Next" ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen( int mouseX, int mouseY, float btn )
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
this.updateCPUButtonText();
|
||||
super.drawScreen( mouseX, mouseY, btn );
|
||||
@@ -162,7 +162,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
if( this.status.myName.length() > 0 )
|
||||
{
|
||||
String name = this.status.myName.substring( 0, Math.min( 20, this.status.myName.length() ) );
|
||||
final String name = this.status.myName.substring( 0, Math.min( 20, this.status.myName.length() ) );
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
@@ -180,7 +180,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getGuiDisplayName( String in )
|
||||
protected String getGuiDisplayName( final String in )
|
||||
{
|
||||
return in; // the cup name is on the button
|
||||
}
|
||||
|
||||
@@ -41,22 +41,22 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
|
||||
GuiImgButton clearBtn;
|
||||
|
||||
public GuiCraftingTerm( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiCraftingTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
|
||||
this.reservedSpace = 73;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
if( this.clearBtn == btn )
|
||||
{
|
||||
Slot s = null;
|
||||
Container c = this.inventorySlots;
|
||||
for( Object j : c.inventorySlots )
|
||||
final Container c = this.inventorySlots;
|
||||
for( final Object j : c.inventorySlots )
|
||||
{
|
||||
if( j instanceof SlotCraftingMatrix )
|
||||
{
|
||||
@@ -66,7 +66,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
|
||||
if( s != null )
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
|
||||
final PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, s.slotNumber, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
|
||||
|
||||
@@ -37,14 +37,14 @@ public class GuiDrive extends AEBaseGui
|
||||
|
||||
GuiTabButton priority;
|
||||
|
||||
public GuiDrive( InventoryPlayer inventoryPlayer, TileDrive te )
|
||||
public GuiDrive( final InventoryPlayer inventoryPlayer, final TileDrive te )
|
||||
{
|
||||
super( new ContainerDrive( inventoryPlayer, te ) );
|
||||
this.ySize = 199;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton par1GuiButton )
|
||||
protected void actionPerformed( final GuiButton par1GuiButton )
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
@@ -63,14 +63,14 @@ public class GuiDrive extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/drive.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -44,7 +44,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
GuiTabButton priority;
|
||||
GuiImgButton placeMode;
|
||||
|
||||
public GuiFormationPlane( InventoryPlayer inventoryPlayer, PartFormationPlane te )
|
||||
public GuiFormationPlane( final InventoryPlayer inventoryPlayer, final PartFormationPlane te )
|
||||
{
|
||||
super( new ContainerFormationPlane( inventoryPlayer, te ) );
|
||||
this.ySize = 251;
|
||||
@@ -63,7 +63,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -86,11 +86,11 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.priority )
|
||||
{
|
||||
|
||||
@@ -30,21 +30,21 @@ import appeng.tile.grindstone.TileGrinder;
|
||||
public class GuiGrinder extends AEBaseGui
|
||||
{
|
||||
|
||||
public GuiGrinder( InventoryPlayer inventoryPlayer, TileGrinder te )
|
||||
public GuiGrinder( final InventoryPlayer inventoryPlayer, final TileGrinder te )
|
||||
{
|
||||
super( new ContainerGrinder( inventoryPlayer, te ) );
|
||||
this.ySize = 176;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/grinder.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -45,7 +45,7 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
GuiImgButton fullMode;
|
||||
GuiImgButton operationMode;
|
||||
|
||||
public GuiIOPort( InventoryPlayer inventoryPlayer, TileIOPort te )
|
||||
public GuiIOPort( final InventoryPlayer inventoryPlayer, final TileIOPort te )
|
||||
{
|
||||
super( new ContainerIOPort( inventoryPlayer, te ) );
|
||||
this.ySize = 166;
|
||||
@@ -64,7 +64,7 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -86,18 +86,18 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
|
||||
for( ItemStack cell1kStack : definitions.items().cell1k().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack cell1kStack : definitions.items().cell1k().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.drawItem( offsetX + 66 - 8, offsetY + 17, cell1kStack );
|
||||
}
|
||||
|
||||
for( ItemStack driveStack : definitions.blocks().drive().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack driveStack : definitions.blocks().drive().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
this.drawItem( offsetX + 94 + 8, offsetY + 17, driveStack );
|
||||
}
|
||||
@@ -110,11 +110,11 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.fullMode )
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiInscriber extends AEBaseGui
|
||||
final ContainerInscriber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiInscriber( InventoryPlayer inventoryPlayer, TileInscriber te )
|
||||
public GuiInscriber( final InventoryPlayer inventoryPlayer, final TileInscriber te )
|
||||
{
|
||||
super( new ContainerInscriber( inventoryPlayer, te ) );
|
||||
this.cvc = (ContainerInscriber) this.inventorySlots;
|
||||
@@ -59,7 +59,7 @@ public class GuiInscriber extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" );
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GuiInscriber extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/inscriber.png" );
|
||||
this.pb.xPosition = 135 + this.guiLeft;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class GuiInterface extends GuiUpgradeable
|
||||
GuiImgButton BlockMode;
|
||||
GuiToggleButton interfaceMode;
|
||||
|
||||
public GuiInterface( InventoryPlayer inventoryPlayer, IInterfaceHost te )
|
||||
public GuiInterface( final InventoryPlayer inventoryPlayer, final IInterfaceHost te )
|
||||
{
|
||||
super( new ContainerInterface( inventoryPlayer, te ) );
|
||||
this.ySize = 211;
|
||||
@@ -65,7 +65,7 @@ public class GuiInterface extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
if( this.BlockMode != null )
|
||||
{
|
||||
@@ -93,11 +93,11 @@ public class GuiInterface extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.priority )
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
private boolean refreshList = false;
|
||||
private MEGuiTextField searchField;
|
||||
|
||||
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartInterfaceTerminal te )
|
||||
public GuiInterfaceTerminal( final InventoryPlayer inventoryPlayer, final PartInterfaceTerminal te )
|
||||
{
|
||||
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
|
||||
this.myScrollBar = new GuiScrollbar();
|
||||
@@ -93,14 +93,14 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
int ex = this.myScrollBar.getCurrentScroll();
|
||||
final int ex = this.myScrollBar.getCurrentScroll();
|
||||
|
||||
Iterator<Object> o = this.inventorySlots.inventorySlots.iterator();
|
||||
final Iterator<Object> o = this.inventorySlots.inventorySlots.iterator();
|
||||
while( o.hasNext() )
|
||||
{
|
||||
if( o.next() instanceof SlotDisconnected )
|
||||
@@ -112,10 +112,10 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
int offset = 17;
|
||||
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
||||
{
|
||||
Object lineObj = this.lines.get( ex + x );
|
||||
final Object lineObj = this.lines.get( ex + x );
|
||||
if( lineObj instanceof ClientDCInternalInv )
|
||||
{
|
||||
ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
for( int z = 0; z < inv.inv.getSizeInventory(); z++ )
|
||||
{
|
||||
this.inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z, z * 18 + 8, 1 + offset ) );
|
||||
@@ -124,7 +124,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
else if( lineObj instanceof String )
|
||||
{
|
||||
String name = (String) lineObj;
|
||||
int rows = this.byName.get( name ).size();
|
||||
final int rows = this.byName.get( name ).size();
|
||||
if( rows > 1 )
|
||||
{
|
||||
name = name + " (" + rows + ')';
|
||||
@@ -142,7 +142,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( final int xCoord, final int yCoord, final int btn )
|
||||
{
|
||||
this.searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
|
||||
@@ -156,23 +156,23 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/interfaceterminal.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
int offset = 17;
|
||||
int ex = this.myScrollBar.getCurrentScroll();
|
||||
final int ex = this.myScrollBar.getCurrentScroll();
|
||||
|
||||
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
||||
{
|
||||
Object lineObj = this.lines.get( ex + x );
|
||||
final Object lineObj = this.lines.get( ex + x );
|
||||
if( lineObj instanceof ClientDCInternalInv )
|
||||
{
|
||||
ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
final ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
|
||||
GL11.glColor4f( 1, 1, 1, 1 );
|
||||
int width = inv.inv.getSizeInventory() * 18;
|
||||
final int width = inv.inv.getSizeInventory() * 18;
|
||||
this.drawTexturedModalRect( offsetX + 7, offsetY + offset, 7, 139, width, 18 );
|
||||
}
|
||||
offset += 18;
|
||||
@@ -185,7 +185,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -205,7 +205,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
public void postUpdate( NBTTagCompound in )
|
||||
public void postUpdate( final NBTTagCompound in )
|
||||
{
|
||||
if( in.getBoolean( "clear" ) )
|
||||
{
|
||||
@@ -213,27 +213,27 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
this.refreshList = true;
|
||||
}
|
||||
|
||||
for( Object oKey : in.func_150296_c() )
|
||||
for( final Object oKey : in.func_150296_c() )
|
||||
{
|
||||
String key = (String) oKey;
|
||||
final String key = (String) oKey;
|
||||
if( key.startsWith( "=" ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
long id = Long.parseLong( key.substring( 1 ), Character.MAX_RADIX );
|
||||
NBTTagCompound invData = in.getCompoundTag( key );
|
||||
ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
||||
final long id = Long.parseLong( key.substring( 1 ), Character.MAX_RADIX );
|
||||
final NBTTagCompound invData = in.getCompoundTag( key );
|
||||
final ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
||||
|
||||
for( int x = 0; x < current.inv.getSizeInventory(); x++ )
|
||||
{
|
||||
String which = Integer.toString( x );
|
||||
final String which = Integer.toString( x );
|
||||
if( invData.hasKey( which ) )
|
||||
{
|
||||
current.inv.setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException ignored )
|
||||
catch( final NumberFormatException ignored )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
final Set<Object> cachedSearch = this.getCacheForSearchTerm( searchFilterLowerCase );
|
||||
final boolean rebuild = cachedSearch.isEmpty();
|
||||
|
||||
for( ClientDCInternalInv entry : this.byId.values() )
|
||||
for( final ClientDCInternalInv entry : this.byId.values() )
|
||||
{
|
||||
// ignore inventory if not doing a full rebuild or cache already marks it as miss.
|
||||
if( !rebuild && !cachedSearch.contains( entry ) )
|
||||
@@ -276,7 +276,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
// Search if the current inventory holds a pattern containing the search term.
|
||||
if( !found && !searchFilterLowerCase.isEmpty() )
|
||||
{
|
||||
for( ItemStack itemStack : entry.inv )
|
||||
for( final ItemStack itemStack : entry.inv )
|
||||
{
|
||||
found = this.itemStackMatchesSearchTerm( itemStack, searchFilterLowerCase );
|
||||
if( found )
|
||||
@@ -306,11 +306,11 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
this.lines.clear();
|
||||
this.lines.ensureCapacity( this.getMaxRows() );
|
||||
|
||||
for( String n : this.names )
|
||||
for( final String n : this.names )
|
||||
{
|
||||
this.lines.add( n );
|
||||
|
||||
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
|
||||
final ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
|
||||
clientInventories.addAll( this.byName.get( n ) );
|
||||
|
||||
Collections.sort( clientInventories );
|
||||
@@ -320,14 +320,14 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
this.myScrollBar.setRange( 0, this.lines.size() - LINES_ON_PAGE, 2 );
|
||||
}
|
||||
|
||||
private boolean itemStackMatchesSearchTerm( ItemStack itemStack, String searchTerm )
|
||||
private boolean itemStackMatchesSearchTerm( final ItemStack itemStack, final String searchTerm )
|
||||
{
|
||||
if( itemStack == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
NBTTagCompound encodedValue = itemStack.getTagCompound();
|
||||
final NBTTagCompound encodedValue = itemStack.getTagCompound();
|
||||
|
||||
if( encodedValue == null )
|
||||
{
|
||||
@@ -336,15 +336,15 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
|
||||
// Potential later use to filter by input
|
||||
// NBTTagList inTag = encodedValue.getTagList( "in", 10 );
|
||||
NBTTagList outTag = encodedValue.getTagList( "out", 10 );
|
||||
final NBTTagList outTag = encodedValue.getTagList( "out", 10 );
|
||||
|
||||
for( int i = 0; i < outTag.tagCount(); i++ )
|
||||
{
|
||||
|
||||
ItemStack parsedItemStack = ItemStack.loadItemStackFromNBT( outTag.getCompoundTagAt( i ) );
|
||||
final ItemStack parsedItemStack = ItemStack.loadItemStackFromNBT( outTag.getCompoundTagAt( i ) );
|
||||
if( parsedItemStack != null )
|
||||
{
|
||||
String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
|
||||
final String displayName = Platform.getItemDisplayName( AEApi.instance().storage().createItemStack( parsedItemStack ) ).toLowerCase();
|
||||
if( displayName.contains( searchTerm ) )
|
||||
{
|
||||
return true;
|
||||
@@ -364,14 +364,14 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
*
|
||||
* @return a Set matching a superset of the search term
|
||||
*/
|
||||
private Set<Object> getCacheForSearchTerm( String searchTerm )
|
||||
private Set<Object> getCacheForSearchTerm( final String searchTerm )
|
||||
{
|
||||
if( !this.cachedSearches.containsKey( searchTerm ) )
|
||||
{
|
||||
this.cachedSearches.put( searchTerm, new HashSet<Object>() );
|
||||
}
|
||||
|
||||
Set<Object> cache = this.cachedSearches.get( searchTerm );
|
||||
final Set<Object> cache = this.cachedSearches.get( searchTerm );
|
||||
|
||||
if( cache.isEmpty() && searchTerm.length() > 1 )
|
||||
{
|
||||
@@ -392,7 +392,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
return this.names.size() + this.byId.size();
|
||||
}
|
||||
|
||||
private ClientDCInternalInv getById( long id, long sortBy, String string )
|
||||
private ClientDCInternalInv getById( final long id, final long sortBy, final String string )
|
||||
{
|
||||
ClientDCInternalInv o = this.byId.get( id );
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
GuiImgButton levelMode;
|
||||
GuiImgButton craftingMode;
|
||||
|
||||
public GuiLevelEmitter( InventoryPlayer inventoryPlayer, PartLevelEmitter te )
|
||||
public GuiLevelEmitter( final InventoryPlayer inventoryPlayer, final PartLevelEmitter te )
|
||||
{
|
||||
super( new ContainerLevelEmitter( inventoryPlayer, te ) );
|
||||
}
|
||||
@@ -88,10 +88,10 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.craftingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_VIA_REDSTONE, YesNo.NO );
|
||||
|
||||
int a = AEConfig.instance.levelByStackAmounts( 0 );
|
||||
int b = AEConfig.instance.levelByStackAmounts( 1 );
|
||||
int c = AEConfig.instance.levelByStackAmounts( 2 );
|
||||
int d = AEConfig.instance.levelByStackAmounts( 3 );
|
||||
final int a = AEConfig.instance.levelByStackAmounts( 0 );
|
||||
final int b = AEConfig.instance.levelByStackAmounts( 1 );
|
||||
final int c = AEConfig.instance.levelByStackAmounts( 2 );
|
||||
final int d = AEConfig.instance.levelByStackAmounts( 3 );
|
||||
|
||||
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
|
||||
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
|
||||
@@ -110,9 +110,9 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
boolean notCraftingMode = this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) == 0;
|
||||
final boolean notCraftingMode = this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) == 0;
|
||||
|
||||
// configure enabled status...
|
||||
this.level.setEnabled( notCraftingMode );
|
||||
@@ -141,7 +141,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
this.level.drawTextBox();
|
||||
@@ -167,11 +167,11 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.craftingMode )
|
||||
{
|
||||
@@ -183,8 +183,8 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.levelMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
final boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
final boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
@@ -192,7 +192,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( long i )
|
||||
private void addQty( final long i )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -226,19 +226,19 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
// nope..
|
||||
this.level.setText( "0" );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -267,7 +267,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GuiMAC extends GuiUpgradeable
|
||||
final ContainerMAC container;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiMAC( InventoryPlayer inventoryPlayer, TileMolecularAssembler te )
|
||||
public GuiMAC( final InventoryPlayer inventoryPlayer, final TileMolecularAssembler te )
|
||||
{
|
||||
super( new ContainerMAC( inventoryPlayer, te ) );
|
||||
this.ySize = 197;
|
||||
@@ -61,14 +61,14 @@ public class GuiMAC extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.pb.setFullMsg( this.container.getCurrentProgress() + "%" );
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.pb.xPosition = 148 + this.guiLeft;
|
||||
this.pb.yPosition = 48 + this.guiTop;
|
||||
|
||||
@@ -96,12 +96,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
GuiImgButton searchBoxSettings;
|
||||
GuiImgButton terminalStyleBox;
|
||||
|
||||
public GuiMEMonitorable( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
this( inventoryPlayer, te, new ContainerMEMonitorable( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
public GuiMEMonitorable( InventoryPlayer inventoryPlayer, ITerminalHost te, ContainerMEMonitorable c )
|
||||
public GuiMEMonitorable( final InventoryPlayer inventoryPlayer, final ITerminalHost te, final ContainerMEMonitorable c )
|
||||
{
|
||||
|
||||
super( c );
|
||||
@@ -145,9 +145,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
}
|
||||
|
||||
public void postUpdate( List<IAEItemStack> list )
|
||||
public void postUpdate( final List<IAEItemStack> list )
|
||||
{
|
||||
for( IAEItemStack is : list )
|
||||
for( final IAEItemStack is : list )
|
||||
{
|
||||
this.repo.postUpdate( is );
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
if( btn == this.craftingStatusBtn )
|
||||
{
|
||||
@@ -172,13 +172,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if( btn instanceof GuiImgButton )
|
||||
{
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
GuiImgButton iBtn = (GuiImgButton) btn;
|
||||
final GuiImgButton iBtn = (GuiImgButton) btn;
|
||||
if( iBtn.getSetting() != Settings.ACTIONS )
|
||||
{
|
||||
Enum cv = iBtn.getCurrentValue();
|
||||
Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
||||
final Enum cv = iBtn.getCurrentValue();
|
||||
final Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
||||
|
||||
if( btn == this.terminalStyleBox )
|
||||
{
|
||||
@@ -194,7 +194,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( iBtn.getSetting().name(), next.name() ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -224,13 +224,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.maxRows = this.getMaxRows();
|
||||
this.perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
|
||||
|
||||
boolean hasNEI = IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI );
|
||||
final boolean hasNEI = IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI );
|
||||
|
||||
int NEI = hasNEI ? 0 : 0;
|
||||
final int NEI = hasNEI ? 0 : 0;
|
||||
int top = hasNEI ? 22 : 0;
|
||||
|
||||
int magicNumber = 114 + 1;
|
||||
int extraSpace = this.height - magicNumber - NEI - top - this.reservedSpace;
|
||||
final int magicNumber = 114 + 1;
|
||||
final int extraSpace = this.height - magicNumber - NEI - top - this.reservedSpace;
|
||||
|
||||
this.rows = (int) Math.floor( extraSpace / 18 );
|
||||
if( this.rows > this.maxRows )
|
||||
@@ -274,7 +274,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
this.ySize = magicNumber + this.rows * 18 + this.reservedSpace;
|
||||
// this.guiTop = top;
|
||||
int unusedSpace = this.height - this.ySize;
|
||||
final int unusedSpace = this.height - this.ySize;
|
||||
this.guiTop = (int) Math.floor( unusedSpace / ( unusedSpace < 0 ? 3.8f : 2.0f ) );
|
||||
|
||||
int offset = this.guiTop + 8;
|
||||
@@ -315,7 +315,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
// Enum setting = AEConfig.INSTANCE.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
||||
Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
final Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
this.searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
||||
|
||||
if( this.isSubGui() )
|
||||
@@ -329,7 +329,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
CraftingGridOffsetX = Integer.MAX_VALUE;
|
||||
CraftingGridOffsetY = Integer.MAX_VALUE;
|
||||
|
||||
for( Object s : this.inventorySlots.inventorySlots )
|
||||
for( final Object s : this.inventorySlots.inventorySlots )
|
||||
{
|
||||
if( s instanceof AppEngSlot )
|
||||
{
|
||||
@@ -341,7 +341,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
||||
{
|
||||
Slot g = (Slot) s;
|
||||
final Slot g = (Slot) s;
|
||||
if( g.xDisplayPosition > 0 && g.yDisplayPosition > 0 )
|
||||
{
|
||||
CraftingGridOffsetX = Math.min( CraftingGridOffsetX, g.xDisplayPosition );
|
||||
@@ -355,16 +355,16 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( this.myName.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked( int xCoord, int yCoord, int btn )
|
||||
protected void mouseClicked( final int xCoord, final int yCoord, final int btn )
|
||||
{
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
final Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
|
||||
if( searchMode != SearchBoxMode.AUTOSEARCH && searchMode != SearchBoxMode.NEI_AUTOSEARCH )
|
||||
{
|
||||
@@ -391,11 +391,11 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
|
||||
this.bindTexture( this.getBackground() );
|
||||
int x_width = 197;
|
||||
final int x_width = 197;
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
|
||||
|
||||
if( this.viewCell || ( this instanceof GuiSecurity ) )
|
||||
@@ -451,13 +451,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
return AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
protected void repositionSlot( AppEngSlot s )
|
||||
protected void repositionSlot( final AppEngSlot s )
|
||||
{
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -505,7 +505,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
||||
public void updateSetting( final IConfigManager manager, final Enum settingName, final Enum newValue )
|
||||
{
|
||||
if( this.SortByBox != null )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ import appeng.container.implementations.ContainerMEPortableCell;
|
||||
public class GuiMEPortableCell extends GuiMEMonitorable
|
||||
{
|
||||
|
||||
public GuiMEPortableCell( InventoryPlayer inventoryPlayer, IPortableCell te )
|
||||
public GuiMEPortableCell( final InventoryPlayer inventoryPlayer, final IPortableCell te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
GuiImgButton units;
|
||||
int tooltip = -1;
|
||||
|
||||
public GuiNetworkStatus( InventoryPlayer inventoryPlayer, INetworkTool te )
|
||||
public GuiNetworkStatus( final InventoryPlayer inventoryPlayer, final INetworkTool te )
|
||||
{
|
||||
super( new ContainerNetworkStatus( inventoryPlayer, te ) );
|
||||
this.ySize = 153;
|
||||
@@ -66,11 +66,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.units )
|
||||
{
|
||||
@@ -89,11 +89,11 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen( int mouseX, int mouseY, float btn )
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
|
||||
int gx = ( this.width - this.xSize ) / 2;
|
||||
int gy = ( this.height - this.ySize ) / 2;
|
||||
final int gx = ( this.width - this.xSize ) / 2;
|
||||
final int gy = ( this.height - this.ySize ) / 2;
|
||||
|
||||
this.tooltip = -1;
|
||||
|
||||
@@ -101,8 +101,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
int x = 0;
|
||||
for( int z = 0; z <= 4 * 5; z++ )
|
||||
{
|
||||
int minX = gx + 14 + x * 31;
|
||||
int minY = gy + 41 + y * 18;
|
||||
final int minX = gx + 14 + x * 31;
|
||||
final int minY = gy + 41 + y * 18;
|
||||
|
||||
if( minX < mouseX && minX + 28 > mouseX )
|
||||
{
|
||||
@@ -126,9 +126,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
ContainerNetworkStatus ns = (ContainerNetworkStatus) this.inventorySlots;
|
||||
final ContainerNetworkStatus ns = (ContainerNetworkStatus) this.inventorySlots;
|
||||
|
||||
this.fontRendererObj.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
|
||||
|
||||
@@ -138,14 +138,14 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
this.fontRendererObj.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.avgAddition, true ), 13, 143 - 10, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.powerUsage, true ), 13, 143 - 20, 4210752 );
|
||||
|
||||
int sectionLength = 30;
|
||||
final int sectionLength = 30;
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int xo = 12;
|
||||
int yo = 42;
|
||||
int viewStart = 0;// myScrollBar.getCurrentScroll() * 5;
|
||||
int viewEnd = viewStart + 5 * 4;
|
||||
final int xo = 12;
|
||||
final int yo = 42;
|
||||
final int viewStart = 0;// myScrollBar.getCurrentScroll() * 5;
|
||||
final int viewEnd = viewStart + 5 * 4;
|
||||
|
||||
String toolTip = "";
|
||||
int toolPosX = 0;
|
||||
@@ -153,7 +153,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
for( int z = viewStart; z < Math.min( viewEnd, this.repo.size() ); z++ )
|
||||
{
|
||||
IAEItemStack refStack = this.repo.getReferenceItem( z );
|
||||
final IAEItemStack refStack = this.repo.getReferenceItem( z );
|
||||
if( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
@@ -165,12 +165,12 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
|
||||
int w = this.fontRendererObj.getStringWidth( str );
|
||||
final int w = this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2, 4210752 );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
int posX = x * sectionLength + xo + sectionLength - 18;
|
||||
int posY = y * 18 + yo;
|
||||
final int posX = x * sectionLength + xo + sectionLength - 18;
|
||||
final int posY = y * 18 + yo;
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
@@ -207,17 +207,17 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/networkstatus.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
public void postUpdate( List<IAEItemStack> list )
|
||||
public void postUpdate( final List<IAEItemStack> list )
|
||||
{
|
||||
this.repo.clear();
|
||||
|
||||
for( IAEItemStack is : list )
|
||||
for( final IAEItemStack is : list )
|
||||
{
|
||||
this.repo.postUpdate( is );
|
||||
}
|
||||
@@ -228,27 +228,27 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = this.repo.size();
|
||||
final int size = this.repo.size();
|
||||
this.myScrollBar.setTop( 39 ).setLeft( 175 ).setHeight( 78 );
|
||||
this.myScrollBar.setRange( 0, ( size + 4 ) / 5 - this.rows, 1 );
|
||||
}
|
||||
|
||||
// @Override - NEI
|
||||
public List<String> handleItemTooltip( ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip )
|
||||
public List<String> handleItemTooltip( final ItemStack stack, final int mouseX, final int mouseY, final List<String> currentToolTip )
|
||||
{
|
||||
if( stack != null )
|
||||
{
|
||||
Slot s = this.getSlot( mouseX, mouseY );
|
||||
final Slot s = this.getSlot( mouseX, mouseY );
|
||||
if( s instanceof SlotME )
|
||||
{
|
||||
IAEItemStack myStack = null;
|
||||
|
||||
try
|
||||
{
|
||||
SlotME theSlotField = (SlotME) s;
|
||||
final SlotME theSlotField = (SlotME) s;
|
||||
myStack = theSlotField.getAEStack();
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -265,25 +265,25 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
// Vanilla version...
|
||||
protected void drawItemStackTooltip( ItemStack stack, int x, int y )
|
||||
protected void drawItemStackTooltip( final ItemStack stack, final int x, final int y )
|
||||
{
|
||||
Slot s = this.getSlot( x, y );
|
||||
final Slot s = this.getSlot( x, y );
|
||||
if( s instanceof SlotME && stack != null )
|
||||
{
|
||||
IAEItemStack myStack = null;
|
||||
|
||||
try
|
||||
{
|
||||
SlotME theSlotField = (SlotME) s;
|
||||
final SlotME theSlotField = (SlotME) s;
|
||||
myStack = theSlotField.getAEStack();
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
}
|
||||
|
||||
if( myStack != null )
|
||||
{
|
||||
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
final List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
while( currentToolTip.size() > 1 )
|
||||
{
|
||||
|
||||
@@ -39,14 +39,14 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
|
||||
GuiToggleButton tFacades;
|
||||
|
||||
public GuiNetworkTool( InventoryPlayer inventoryPlayer, INetworkTool te )
|
||||
public GuiNetworkTool( final InventoryPlayer inventoryPlayer, final INetworkTool te )
|
||||
{
|
||||
super( new ContainerNetworkTool( inventoryPlayer, te ) );
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -57,7 +57,7 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "NetworkTool", "Toggle" ) );
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
if( this.tFacades != null )
|
||||
{
|
||||
@@ -86,7 +86,7 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/toolbox.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -49,7 +49,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
GuiImgButton encodeBtn;
|
||||
GuiImgButton clearBtn;
|
||||
|
||||
public GuiPatternTerm( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiPatternTerm( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerPatternTerm( inventoryPlayer, te ) );
|
||||
this.container = (ContainerPatternTerm) this.inventorySlots;
|
||||
@@ -57,7 +57,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -79,7 +79,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PatternTerminal.Clear", "1" ) );
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
@@ -109,7 +109,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
if( !this.container.craftingMode )
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void repositionSlot( AppEngSlot s )
|
||||
protected void repositionSlot( final AppEngSlot s )
|
||||
{
|
||||
if( s.isPlayerSide() )
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
GuiBridge OriginalGui;
|
||||
|
||||
public GuiPriority( InventoryPlayer inventoryPlayer, IPriorityHost te )
|
||||
public GuiPriority( final InventoryPlayer inventoryPlayer, final IPriorityHost te )
|
||||
{
|
||||
super( new ContainerPriority( inventoryPlayer, te ) );
|
||||
}
|
||||
@@ -77,10 +77,10 @@ public class GuiPriority extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
int a = AEConfig.instance.priorityByStacksAmounts( 0 );
|
||||
int b = AEConfig.instance.priorityByStacksAmounts( 1 );
|
||||
int c = AEConfig.instance.priorityByStacksAmounts( 2 );
|
||||
int d = AEConfig.instance.priorityByStacksAmounts( 3 );
|
||||
final int a = AEConfig.instance.priorityByStacksAmounts( 0 );
|
||||
final int b = AEConfig.instance.priorityByStacksAmounts( 1 );
|
||||
final int c = AEConfig.instance.priorityByStacksAmounts( 2 );
|
||||
final int d = AEConfig.instance.priorityByStacksAmounts( 3 );
|
||||
|
||||
this.buttonList.add( this.plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 32, 22, 20, "+" + a ) );
|
||||
this.buttonList.add( this.plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 32, 28, 20, "+" + b ) );
|
||||
@@ -93,14 +93,14 @@ public class GuiPriority extends AEBaseGui
|
||||
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 69, 38, 20, "-" + d ) );
|
||||
|
||||
ItemStack myIcon = null;
|
||||
Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
|
||||
final Object target = ( (AEBaseContainer) this.inventorySlots ).getTarget();
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IParts parts = definitions.parts();
|
||||
final IBlocks blocks = definitions.blocks();
|
||||
|
||||
if( target instanceof PartStorageBus )
|
||||
{
|
||||
for( ItemStack storageBusStack : parts.storageBus().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack storageBusStack : parts.storageBus().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = storageBusStack;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
if( target instanceof PartFormationPlane )
|
||||
{
|
||||
for( ItemStack formationPlaneStack : parts.formationPlane().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack formationPlaneStack : parts.formationPlane().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = formationPlaneStack;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
if( target instanceof TileDrive )
|
||||
{
|
||||
for( ItemStack driveStack : blocks.drive().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack driveStack : blocks.drive().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = driveStack;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
if( target instanceof TileChest )
|
||||
{
|
||||
for( ItemStack chestStack : blocks.chest().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack chestStack : blocks.chest().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = chestStack;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
if( target instanceof TileInterface )
|
||||
{
|
||||
for( ItemStack interfaceStack : blocks.iface().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack interfaceStack : blocks.iface().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = interfaceStack;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
if( target instanceof PartInterface )
|
||||
{
|
||||
for( ItemStack interfaceStack : parts.iface().maybeStack( 1 ).asSet() )
|
||||
for( final ItemStack interfaceStack : parts.iface().maybeStack( 1 ).asSet() )
|
||||
{
|
||||
myIcon = interfaceStack;
|
||||
}
|
||||
@@ -170,13 +170,13 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/priority.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
@@ -185,7 +185,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -194,8 +194,8 @@ public class GuiPriority extends AEBaseGui
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( this.OriginalGui ) );
|
||||
}
|
||||
|
||||
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
final boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||
final boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
@@ -203,7 +203,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( int i )
|
||||
private void addQty( final int i )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -233,19 +233,19 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", out ) );
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
// nope..
|
||||
this.priority.setText( "0" );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
@@ -274,7 +274,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", out ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
@@ -30,21 +30,21 @@ import appeng.tile.qnb.TileQuantumBridge;
|
||||
public class GuiQNB extends AEBaseGui
|
||||
{
|
||||
|
||||
public GuiQNB( InventoryPlayer inventoryPlayer, TileQuantumBridge te )
|
||||
public GuiQNB( final InventoryPlayer inventoryPlayer, final TileQuantumBridge te )
|
||||
{
|
||||
super( new ContainerQNB( inventoryPlayer, te ) );
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.QuantumLinkChamber.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -38,7 +38,7 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
|
||||
GuiTextField name;
|
||||
|
||||
public GuiQuartzKnife( InventoryPlayer inventoryPlayer, QuartzKnifeObj te )
|
||||
public GuiQuartzKnife( final InventoryPlayer inventoryPlayer, final QuartzKnifeObj te )
|
||||
{
|
||||
super( new ContainerQuartzKnife( inventoryPlayer, te ) );
|
||||
this.ySize = 184;
|
||||
@@ -58,14 +58,14 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.QuartzCuttingKnife.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/quartzknife.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
@@ -73,17 +73,17 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped( char character, int key )
|
||||
protected void keyTyped( final char character, final int key )
|
||||
{
|
||||
if( this.name.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = this.name.getText();
|
||||
final String Out = this.name.getText();
|
||||
( (ContainerQuartzKnife) this.inventorySlots ).setName( Out );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "QuartzKnife.Name", Out ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
GuiToggleButton build;
|
||||
GuiToggleButton security;
|
||||
|
||||
public GuiSecurity( InventoryPlayer inventoryPlayer, ITerminalHost te )
|
||||
public GuiSecurity( final InventoryPlayer inventoryPlayer, final ITerminalHost te )
|
||||
{
|
||||
super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) );
|
||||
this.customSortOrder = false;
|
||||
@@ -55,7 +55,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( net.minecraft.client.gui.GuiButton btn )
|
||||
protected void actionPerformed( final net.minecraft.client.gui.GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -88,7 +88,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "TileSecurity.ToggleOption", toggleSetting.name() ) );
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
@@ -100,7 +100,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
int top = this.guiTop + this.ySize - 116;
|
||||
final int top = this.guiTop + this.ySize - 116;
|
||||
this.buttonList.add( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
|
||||
this.buttonList.add( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT.getUnlocalizedName(), SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
|
||||
@@ -113,7 +113,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
this.fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
|
||||
@@ -122,7 +122,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
ContainerSecurity cs = (ContainerSecurity) this.inventorySlots;
|
||||
final ContainerSecurity cs = (ContainerSecurity) this.inventorySlots;
|
||||
|
||||
this.inject.setState( ( cs.security & ( 1 << SecurityPermissions.INJECT.ordinal() ) ) > 0 );
|
||||
this.extract.setState( ( cs.security & ( 1 << SecurityPermissions.EXTRACT.ordinal() ) ) > 0 );
|
||||
|
||||
@@ -32,21 +32,21 @@ import appeng.tile.storage.TileSkyChest;
|
||||
public class GuiSkyChest extends AEBaseGui
|
||||
{
|
||||
|
||||
public GuiSkyChest( InventoryPlayer inventoryPlayer, TileSkyChest te )
|
||||
public GuiSkyChest( final InventoryPlayer inventoryPlayer, final TileSkyChest te )
|
||||
{
|
||||
super( new ContainerSkyChest( inventoryPlayer, te ) );
|
||||
this.ySize = 195;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.SkyChest.getLocal() ), 8, 8, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 2, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/skychest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -40,7 +40,7 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
final ContainerSpatialIOPort container;
|
||||
GuiImgButton units;
|
||||
|
||||
public GuiSpatialIOPort( InventoryPlayer inventoryPlayer, TileSpatialIOPort te )
|
||||
public GuiSpatialIOPort( final InventoryPlayer inventoryPlayer, final TileSpatialIOPort te )
|
||||
{
|
||||
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
|
||||
this.ySize = 199;
|
||||
@@ -48,11 +48,11 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.units )
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.currentPower, false ), 13, 21, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( this.container.maxPower, false ), 13, 31, 4210752 );
|
||||
@@ -83,7 +83,7 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/spatialio.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -53,7 +53,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
GuiImgButton partition;
|
||||
GuiImgButton clear;
|
||||
|
||||
public GuiStorageBus( InventoryPlayer inventoryPlayer, PartStorageBus te )
|
||||
public GuiStorageBus( final InventoryPlayer inventoryPlayer, final PartStorageBus te )
|
||||
{
|
||||
super( new ContainerStorageBus( inventoryPlayer, te ) );
|
||||
this.ySize = 251;
|
||||
@@ -78,7 +78,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.StorageBus.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -106,11 +106,11 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.storageFilter.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
catch( final IOException e )
|
||||
{
|
||||
AELog.error( e );
|
||||
}
|
||||
|
||||
@@ -52,12 +52,12 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
GuiImgButton craftMode;
|
||||
GuiImgButton schedulingMode;
|
||||
|
||||
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
|
||||
public GuiUpgradeable( final InventoryPlayer inventoryPlayer, final IUpgradeableHost te )
|
||||
{
|
||||
this( new ContainerUpgradeable( inventoryPlayer, te ) );
|
||||
}
|
||||
|
||||
public GuiUpgradeable( ContainerUpgradeable te )
|
||||
public GuiUpgradeable( final ContainerUpgradeable te )
|
||||
{
|
||||
super( te );
|
||||
this.cvb = te;
|
||||
@@ -93,7 +93,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -120,7 +120,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.handleButtonVisibility();
|
||||
|
||||
@@ -172,11 +172,11 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.redstoneMode )
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
final ContainerVibrationChamber cvc;
|
||||
GuiProgressBar pb;
|
||||
|
||||
public GuiVibrationChamber( InventoryPlayer inventoryPlayer, TileVibrationChamber te )
|
||||
public GuiVibrationChamber( final InventoryPlayer inventoryPlayer, final TileVibrationChamber te )
|
||||
{
|
||||
super( new ContainerVibrationChamber( inventoryPlayer, te ) );
|
||||
this.cvc = (ContainerVibrationChamber) this.inventorySlots;
|
||||
@@ -54,7 +54,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
@@ -63,17 +63,17 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
|
||||
if( this.cvc.getCurrentProgress() > 0 )
|
||||
{
|
||||
int i1 = this.cvc.getCurrentProgress();
|
||||
final int i1 = this.cvc.getCurrentProgress();
|
||||
this.bindTexture( "guis/vibchamber.png" );
|
||||
GL11.glColor3f( 1, 1, 1 );
|
||||
int l = -15;
|
||||
int k = 25;
|
||||
final int l = -15;
|
||||
final int k = 25;
|
||||
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/vibchamber.png" );
|
||||
this.pb.xPosition = 99 + this.guiLeft;
|
||||
|
||||
@@ -39,18 +39,18 @@ public class GuiWireless extends AEBaseGui
|
||||
|
||||
GuiImgButton units;
|
||||
|
||||
public GuiWireless( InventoryPlayer inventoryPlayer, TileWireless te )
|
||||
public GuiWireless( final InventoryPlayer inventoryPlayer, final TileWireless te )
|
||||
{
|
||||
super( new ContainerWireless( inventoryPlayer, te ) );
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed( GuiButton btn )
|
||||
protected void actionPerformed( final GuiButton btn )
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
final boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.units )
|
||||
{
|
||||
@@ -69,27 +69,27 @@ public class GuiWireless extends AEBaseGui
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawFG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Wireless.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
ContainerWireless cw = (ContainerWireless) this.inventorySlots;
|
||||
final ContainerWireless cw = (ContainerWireless) this.inventorySlots;
|
||||
|
||||
if( cw.range > 0 )
|
||||
{
|
||||
String firstMessage = GuiText.Range.getLocal() + ": " + ( cw.range / 10.0 ) + " m";
|
||||
String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
||||
final String firstMessage = GuiText.Range.getLocal() + ": " + ( cw.range / 10.0 ) + " m";
|
||||
final String secondMessage = GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( cw.drain, true );
|
||||
|
||||
int strWidth = Math.max( this.fontRendererObj.getStringWidth( firstMessage ), this.fontRendererObj.getStringWidth( secondMessage ) );
|
||||
int cOffset = ( this.xSize / 2 ) - ( strWidth / 2 );
|
||||
final int strWidth = Math.max( this.fontRendererObj.getStringWidth( firstMessage ), this.fontRendererObj.getStringWidth( secondMessage ) );
|
||||
final int cOffset = ( this.xSize / 2 ) - ( strWidth / 2 );
|
||||
this.fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
|
||||
this.fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
this.bindTexture( "guis/wireless.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
@@ -27,7 +27,7 @@ import appeng.api.implementations.guiobjects.IPortableCell;
|
||||
public class GuiWirelessTerm extends GuiMEPortableCell
|
||||
{
|
||||
|
||||
public GuiWirelessTerm( InventoryPlayer inventoryPlayer, IPortableCell te )
|
||||
public GuiWirelessTerm( final InventoryPlayer inventoryPlayer, final IPortableCell te )
|
||||
{
|
||||
super( inventoryPlayer, te );
|
||||
this.maxRows = Integer.MAX_VALUE;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
public String fillVar;
|
||||
private Enum currentValue;
|
||||
|
||||
public GuiImgButton( int x, int y, Enum idx, Enum val )
|
||||
public GuiImgButton( final int x, final int y, final Enum idx, final Enum val )
|
||||
{
|
||||
super( 0, 0, 16, "" );
|
||||
|
||||
@@ -166,27 +166,27 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
}
|
||||
|
||||
private void registerApp( int iconIndex, Settings setting, Enum val, ButtonToolTips title, Object hint )
|
||||
private void registerApp( final int iconIndex, final Settings setting, final Enum val, final ButtonToolTips title, final Object hint )
|
||||
{
|
||||
ButtonAppearance a = new ButtonAppearance();
|
||||
final ButtonAppearance a = new ButtonAppearance();
|
||||
a.displayName = title.getUnlocalized();
|
||||
a.displayValue = (String) ( hint instanceof String ? hint : ( (ButtonToolTips) hint ).getUnlocalized() );
|
||||
a.index = iconIndex;
|
||||
appearances.put( new EnumPair( setting, val ), a );
|
||||
}
|
||||
|
||||
public void setVisibility( boolean vis )
|
||||
public void setVisibility( final boolean vis )
|
||||
{
|
||||
this.visible = vis;
|
||||
this.enabled = vis;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton( Minecraft par1Minecraft, int par2, int par3 )
|
||||
public void drawButton( final Minecraft par1Minecraft, final int par2, final int par3 )
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
int iconIndex = this.getIconIndex();
|
||||
final int iconIndex = this.getIconIndex();
|
||||
|
||||
if( this.halfSize )
|
||||
{
|
||||
@@ -209,8 +209,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
final int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
final int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
this.drawTexturedModalRect( 0, 0, 256 - 16, 256 - 16, 16, 16 );
|
||||
this.drawTexturedModalRect( 0, 0, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
@@ -232,8 +232,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
final int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
final int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, 256 - 16, 256 - 16, 16, 16 );
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
@@ -247,7 +247,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
{
|
||||
if( this.buttonSetting != null && this.currentValue != null )
|
||||
{
|
||||
ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
final ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
if( app == null )
|
||||
{
|
||||
return 256 - 1;
|
||||
@@ -275,7 +275,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
if( this.buttonSetting != null && this.currentValue != null )
|
||||
{
|
||||
ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
final ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
if( buttonAppearance == null )
|
||||
{
|
||||
return "No Such Message";
|
||||
@@ -305,7 +305,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||
StringBuilder sb = new StringBuilder( value );
|
||||
final StringBuilder sb = new StringBuilder( value );
|
||||
|
||||
int i = sb.lastIndexOf( "\n" );
|
||||
if( i <= 0 )
|
||||
@@ -352,7 +352,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
return this.visible;
|
||||
}
|
||||
|
||||
public void set( Enum e )
|
||||
public void set( final Enum e )
|
||||
{
|
||||
if( this.currentValue != e )
|
||||
{
|
||||
@@ -366,7 +366,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
final Enum setting;
|
||||
final Enum value;
|
||||
|
||||
EnumPair( Enum a, Enum b )
|
||||
EnumPair( final Enum a, final Enum b )
|
||||
{
|
||||
this.setting = a;
|
||||
this.value = b;
|
||||
@@ -379,7 +379,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object obj )
|
||||
public boolean equals( final Object obj )
|
||||
{
|
||||
if( obj == null )
|
||||
{
|
||||
@@ -389,7 +389,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
{
|
||||
return false;
|
||||
}
|
||||
EnumPair other = (EnumPair) obj;
|
||||
final EnumPair other = (EnumPair) obj;
|
||||
return other.setting == this.setting && other.value == this.value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,16 +28,16 @@ public class GuiNumberBox extends GuiTextField
|
||||
|
||||
final Class type;
|
||||
|
||||
public GuiNumberBox( FontRenderer fontRenderer, int x, int y, int width, int height, Class type )
|
||||
public GuiNumberBox( final FontRenderer fontRenderer, final int x, final int y, final int width, final int height, final Class type )
|
||||
{
|
||||
super( fontRenderer, x, y, width, height );
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeText( String selectedText )
|
||||
public void writeText( final String selectedText )
|
||||
{
|
||||
String original = this.getText();
|
||||
final String original = this.getText();
|
||||
super.writeText( selectedText );
|
||||
|
||||
try
|
||||
@@ -55,7 +55,7 @@ public class GuiNumberBox extends GuiTextField
|
||||
Double.parseDouble( this.getText() );
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
catch( final NumberFormatException e )
|
||||
{
|
||||
this.setText( original );
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
private final String titleName;
|
||||
private String fullMsg;
|
||||
|
||||
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir )
|
||||
public GuiProgressBar( final IProgressProvider source, final String texture, final int posX, final int posY, final int u, final int y, final int width, final int height, final Direction dir )
|
||||
{
|
||||
this( source, texture, posX, posY, u, y, width, height, dir, null );
|
||||
}
|
||||
|
||||
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir, String title )
|
||||
public GuiProgressBar( final IProgressProvider source, final String texture, final int posX, final int posY, final int u, final int y, final int width, final int height, final Direction dir, final String title )
|
||||
{
|
||||
super( posX, posY, width, "" );
|
||||
this.source = source;
|
||||
@@ -59,22 +59,22 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton( Minecraft par1Minecraft, int par2, int par3 )
|
||||
public void drawButton( final Minecraft par1Minecraft, final int par2, final int par3 )
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
par1Minecraft.getTextureManager().bindTexture( this.texture );
|
||||
int max = this.source.getMaxProgress();
|
||||
int current = this.source.getCurrentProgress();
|
||||
final int max = this.source.getMaxProgress();
|
||||
final int current = this.source.getCurrentProgress();
|
||||
|
||||
if( this.layout == Direction.VERTICAL )
|
||||
{
|
||||
int diff = this.height - ( max > 0 ? ( this.height * current ) / max : 0 );
|
||||
final int diff = this.height - ( max > 0 ? ( this.height * current ) / max : 0 );
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition + diff, this.fill_u, this.fill_v + diff, this.width, this.height - diff );
|
||||
}
|
||||
else
|
||||
{
|
||||
int diff = this.width - ( max > 0 ? ( this.width * current ) / max : 0 );
|
||||
final int diff = this.width - ( max > 0 ? ( this.width * current ) / max : 0 );
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, this.fill_u + diff, this.fill_v, this.width - diff, this.height );
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
}
|
||||
}
|
||||
|
||||
public void setFullMsg( String msg )
|
||||
public void setFullMsg( final String msg )
|
||||
{
|
||||
this.fullMsg = msg;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
private int minScroll = 0;
|
||||
private int currentScroll = 0;
|
||||
|
||||
public void draw( AEBaseGui g )
|
||||
public void draw( final AEBaseGui g )
|
||||
{
|
||||
g.bindTexture( "minecraft", "gui/container/creative_inventory/tabs.png" );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
@@ -48,7 +48,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
}
|
||||
else
|
||||
{
|
||||
int offset = ( this.currentScroll - this.minScroll ) * ( this.height - 15 ) / this.getRange();
|
||||
final int offset = ( this.currentScroll - this.minScroll ) * ( this.height - 15 ) / this.getRange();
|
||||
g.drawTexturedModalRect( this.displayX, offset + this.displayY, 232, 0, this.width, 15 );
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
return this.displayX;
|
||||
}
|
||||
|
||||
public GuiScrollbar setLeft( int v )
|
||||
public GuiScrollbar setLeft( final int v )
|
||||
{
|
||||
this.displayX = v;
|
||||
return this;
|
||||
@@ -74,7 +74,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
return this.displayY;
|
||||
}
|
||||
|
||||
public GuiScrollbar setTop( int v )
|
||||
public GuiScrollbar setTop( final int v )
|
||||
{
|
||||
this.displayY = v;
|
||||
return this;
|
||||
@@ -85,7 +85,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
return this.width;
|
||||
}
|
||||
|
||||
public GuiScrollbar setWidth( int v )
|
||||
public GuiScrollbar setWidth( final int v )
|
||||
{
|
||||
this.width = v;
|
||||
return this;
|
||||
@@ -96,13 +96,13 @@ public class GuiScrollbar implements IScrollSource
|
||||
return this.height;
|
||||
}
|
||||
|
||||
public GuiScrollbar setHeight( int v )
|
||||
public GuiScrollbar setHeight( final int v )
|
||||
{
|
||||
this.height = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRange( int min, int max, int pageSize )
|
||||
public void setRange( final int min, final int max, final int pageSize )
|
||||
{
|
||||
this.minScroll = min;
|
||||
this.maxScroll = max;
|
||||
@@ -127,7 +127,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
return this.currentScroll;
|
||||
}
|
||||
|
||||
public void click( AEBaseGui aeBaseGui, int x, int y )
|
||||
public void click( final AEBaseGui aeBaseGui, final int x, final int y )
|
||||
{
|
||||
if( this.getRange() == 0 )
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
private int myIcon = -1;
|
||||
private ItemStack myItem;
|
||||
|
||||
public GuiTabButton( int x, int y, int ico, String message, RenderItem ir )
|
||||
public GuiTabButton( final int x, final int y, final int ico, final String message, final RenderItem ir )
|
||||
{
|
||||
super( 0, 0, 16, "" );
|
||||
|
||||
@@ -62,7 +62,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
* @param message mouse over message
|
||||
* @param ir renderer
|
||||
*/
|
||||
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
||||
public GuiTabButton( final int x, final int y, final ItemStack ico, final String message, final RenderItem ir )
|
||||
{
|
||||
super( 0, 0, 16, "" );
|
||||
this.xPosition = x;
|
||||
@@ -75,7 +75,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton( Minecraft minecraft, int x, int y )
|
||||
public void drawButton( final Minecraft minecraft, final int x, final int y )
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
@@ -85,13 +85,13 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
|
||||
int uv_x = ( this.hideEdge > 0 ? 11 : 13 );
|
||||
|
||||
int offsetX = this.hideEdge > 0 ? 1 : 0;
|
||||
final int offsetX = this.hideEdge > 0 ? 1 : 0;
|
||||
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, uv_x * 16, 0, 25, 22 );
|
||||
|
||||
if( this.myIcon >= 0 )
|
||||
{
|
||||
int uv_y = (int) Math.floor( this.myIcon / 16 );
|
||||
final int uv_y = (int) Math.floor( this.myIcon / 16 );
|
||||
uv_x = this.myIcon - uv_y * 16;
|
||||
|
||||
this.drawTexturedModalRect( offsetX + this.xPosition + 3, this.yPosition + 3, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
@@ -107,7 +107,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
FontRenderer fontrenderer = minecraft.fontRenderer;
|
||||
final FontRenderer fontrenderer = minecraft.fontRenderer;
|
||||
this.itemRenderer.renderItemAndEffectIntoGUI( fontrenderer, minecraft.renderEngine, this.myItem, offsetX + this.xPosition + 3, this.yPosition + 3 );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
|
||||
private boolean isActive;
|
||||
|
||||
public GuiToggleButton( int x, int y, int on, int off, String displayName, String displayHint )
|
||||
public GuiToggleButton( final int x, final int y, final int on, final int off, final String displayName, final String displayHint )
|
||||
{
|
||||
super( 0, 0, 16, "" );
|
||||
this.iconIdxOn = on;
|
||||
@@ -54,24 +54,24 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
this.height = 16;
|
||||
}
|
||||
|
||||
public void setState( boolean isOn )
|
||||
public void setState( final boolean isOn )
|
||||
{
|
||||
this.isActive = isOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton( Minecraft par1Minecraft, int par2, int par3 )
|
||||
public void drawButton( final Minecraft par1Minecraft, final int par2, final int par3 )
|
||||
{
|
||||
if( this.visible )
|
||||
{
|
||||
int iconIndex = this.getIconIndex();
|
||||
final int iconIndex = this.getIconIndex();
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
final int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
final int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, 256 - 16, 256 - 16, 16, 16 );
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, uv_x * 16, uv_y * 16, 16, 16 );
|
||||
@@ -102,7 +102,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
}
|
||||
|
||||
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||
StringBuilder sb = new StringBuilder( value );
|
||||
final StringBuilder sb = new StringBuilder( value );
|
||||
|
||||
int i = sb.lastIndexOf( "\n" );
|
||||
if( i <= 0 )
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
* @param width absolute width
|
||||
* @param height absolute height
|
||||
*/
|
||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||
public MEGuiTextField( final FontRenderer fontRenderer, final int xPos, final int yPos, final int width, final int height )
|
||||
{
|
||||
super( fontRenderer, xPos + PADDING, yPos + PADDING, width - 2 * PADDING - fontRenderer.getCharWidth( '_' ), height - 2 * PADDING );
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked( int xPos, int yPos, int button )
|
||||
public void mouseClicked( final int xPos, final int yPos, final int button )
|
||||
{
|
||||
super.mouseClicked( xPos, yPos, button );
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
*
|
||||
* @return true if mouse position is within the text field area
|
||||
*/
|
||||
public boolean isMouseIn( int xCoord, int yCoord )
|
||||
public boolean isMouseIn( final int xCoord, final int yCoord )
|
||||
{
|
||||
final boolean withinXRange = this._xPos <= xCoord && xCoord < this._xPos + this._width;
|
||||
final boolean withinYRange = this._yPos <= yCoord && yCoord < this._yPos + this._height;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
public final long id;
|
||||
public final long sortBy;
|
||||
|
||||
public ClientDCInternalInv( int size, long id, long sortBy, String unlocalizedName )
|
||||
public ClientDCInternalInv( final int size, final long id, final long sortBy, final String unlocalizedName )
|
||||
{
|
||||
this.inv = new AppEngInternalInventory( null, size );
|
||||
this.unlocalizedName = unlocalizedName;
|
||||
@@ -45,7 +45,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
|
||||
public String getName()
|
||||
{
|
||||
String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
final String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
if( s.equals( this.unlocalizedName + ".name" ) )
|
||||
{
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
@@ -54,7 +54,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo( @Nonnull ClientDCInternalInv o )
|
||||
public int compareTo( @Nonnull final ClientDCInternalInv o )
|
||||
{
|
||||
return ItemSorters.compareLong( this.sortBy, o.sortBy );
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class InternalSlotME
|
||||
public final int yPos;
|
||||
private final ItemRepo repo;
|
||||
|
||||
public InternalSlotME( ItemRepo def, int offset, int displayX, int displayY )
|
||||
public InternalSlotME( final ItemRepo def, final int offset, final int displayX, final int displayY )
|
||||
{
|
||||
this.repo = def;
|
||||
this.offset = offset;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class ItemRepo
|
||||
private String NEIWord = null;
|
||||
private boolean hasPower;
|
||||
|
||||
public ItemRepo( IScrollSource src, ISortSource sortSrc )
|
||||
public ItemRepo( final IScrollSource src, final ISortSource sortSrc )
|
||||
{
|
||||
this.src = src;
|
||||
this.sortSrc = sortSrc;
|
||||
@@ -91,14 +91,14 @@ public class ItemRepo
|
||||
return this.dsp.get( idx );
|
||||
}
|
||||
|
||||
void setSearch( String search )
|
||||
void setSearch( final String search )
|
||||
{
|
||||
this.searchString = search == null ? "" : search;
|
||||
}
|
||||
|
||||
public void postUpdate( IAEItemStack is )
|
||||
public void postUpdate( final IAEItemStack is )
|
||||
{
|
||||
IAEItemStack st = this.list.findPrecise( is );
|
||||
final IAEItemStack st = this.list.findPrecise( is );
|
||||
|
||||
if( st != null )
|
||||
{
|
||||
@@ -111,7 +111,7 @@ public class ItemRepo
|
||||
}
|
||||
}
|
||||
|
||||
public void setViewCell( ItemStack[] list )
|
||||
public void setViewCell( final ItemStack[] list )
|
||||
{
|
||||
this.myPartitionList = ItemViewCell.createFilter( list );
|
||||
this.updateView();
|
||||
@@ -125,15 +125,15 @@ public class ItemRepo
|
||||
this.view.ensureCapacity( this.list.size() );
|
||||
this.dsp.ensureCapacity( this.list.size() );
|
||||
|
||||
Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
final Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
final Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
{
|
||||
this.updateNEI( this.searchString );
|
||||
}
|
||||
|
||||
this.innerSearch = this.searchString;
|
||||
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
final boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
// boolean terminalSearchMods = Configuration.INSTANCE.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
|
||||
|
||||
boolean searchMod = false;
|
||||
@@ -148,13 +148,13 @@ public class ItemRepo
|
||||
{
|
||||
m = Pattern.compile( this.innerSearch.toLowerCase(), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
try
|
||||
{
|
||||
m = Pattern.compile( Pattern.quote( this.innerSearch.toLowerCase() ), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch( Throwable __ )
|
||||
catch( final Throwable __ )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public class ItemRepo
|
||||
continue;
|
||||
}
|
||||
|
||||
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
final String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
notDone = true;
|
||||
|
||||
if( m.matcher( dspName.toLowerCase() ).find() )
|
||||
@@ -198,7 +198,7 @@ public class ItemRepo
|
||||
|
||||
if( terminalSearchToolTips && notDone )
|
||||
{
|
||||
for( Object lp : Platform.getTooltip( is ) )
|
||||
for( final Object lp : Platform.getTooltip( is ) )
|
||||
{
|
||||
if( lp instanceof String && m.matcher( (CharSequence) lp ).find() )
|
||||
{
|
||||
@@ -215,8 +215,8 @@ public class ItemRepo
|
||||
*/
|
||||
}
|
||||
|
||||
Enum SortBy = this.sortSrc.getSortBy();
|
||||
Enum SortDir = this.sortSrc.getSortDir();
|
||||
final Enum SortBy = this.sortSrc.getSortBy();
|
||||
final Enum SortDir = this.sortSrc.getSortDir();
|
||||
|
||||
ItemSorters.Direction = (appeng.api.config.SortDir) SortDir;
|
||||
ItemSorters.init();
|
||||
@@ -238,31 +238,31 @@ public class ItemRepo
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME );
|
||||
}
|
||||
|
||||
for( IAEItemStack is : this.view )
|
||||
for( final IAEItemStack is : this.view )
|
||||
{
|
||||
this.dsp.add( is.getItemStack() );
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNEI( String filter )
|
||||
private void updateNEI( final String filter )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( this.NEIWord == null || !this.NEIWord.equals( filter ) )
|
||||
{
|
||||
Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
Field fldSearchField = c.getField( "searchField" );
|
||||
Object searchField = fldSearchField.get( c );
|
||||
final Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
final Field fldSearchField = c.getField( "searchField" );
|
||||
final Object searchField = fldSearchField.get( c );
|
||||
|
||||
Method a = searchField.getClass().getMethod( "setText", String.class );
|
||||
Method b = searchField.getClass().getMethod( "onTextChange", String.class );
|
||||
final Method a = searchField.getClass().getMethod( "setText", String.class );
|
||||
final Method b = searchField.getClass().getMethod( "onTextChange", String.class );
|
||||
|
||||
this.NEIWord = filter;
|
||||
a.invoke( searchField, filter );
|
||||
b.invoke( searchField, "" );
|
||||
}
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -283,7 +283,7 @@ public class ItemRepo
|
||||
return this.hasPower;
|
||||
}
|
||||
|
||||
public void setPower( boolean hasPower )
|
||||
public void setPower( final boolean hasPower )
|
||||
{
|
||||
this.hasPower = hasPower;
|
||||
}
|
||||
|
||||
@@ -33,26 +33,26 @@ public class SlotDisconnected extends AppEngSlot
|
||||
|
||||
public final ClientDCInternalInv mySlot;
|
||||
|
||||
public SlotDisconnected( ClientDCInternalInv me, int which, int x, int y )
|
||||
public SlotDisconnected( final ClientDCInternalInv me, final int which, final int x, final int y )
|
||||
{
|
||||
super( me.inv, which, x, y );
|
||||
this.mySlot = me;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid( ItemStack par1ItemStack )
|
||||
public boolean isItemValid( final ItemStack par1ItemStack )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack( ItemStack par1ItemStack )
|
||||
public void putStack( final ItemStack par1ItemStack )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -62,11 +62,11 @@ public class SlotDisconnected extends AppEngSlot
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
ItemStack is = super.getStack();
|
||||
final ItemStack is = super.getStack();
|
||||
if( is != null && is.getItem() instanceof ItemEncodedPattern )
|
||||
{
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
ItemStack out = iep.getOutput( is );
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
final ItemStack out = iep.getOutput( is );
|
||||
if( out != null )
|
||||
{
|
||||
return out;
|
||||
@@ -77,7 +77,7 @@ public class SlotDisconnected extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot( EntityPlayer par1EntityPlayer, ItemStack par2ItemStack )
|
||||
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -94,13 +94,13 @@ public class SlotDisconnected extends AppEngSlot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize( int par1 )
|
||||
public ItemStack decrStackSize( final int par1 )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSlotInInventory( IInventory par1iInventory, int par2 )
|
||||
public boolean isSlotInInventory( final IInventory par1iInventory, final int par2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SlotME extends Slot
|
||||
|
||||
public final InternalSlotME mySlot;
|
||||
|
||||
public SlotME( InternalSlotME me )
|
||||
public SlotME( final InternalSlotME me )
|
||||
{
|
||||
super( null, 0, me.xPos, me.yPos );
|
||||
this.mySlot = me;
|
||||
@@ -48,12 +48,12 @@ public class SlotME extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot( EntityPlayer par1EntityPlayer, ItemStack par2ItemStack )
|
||||
public void onPickupFromSlot( final EntityPlayer par1EntityPlayer, final ItemStack par2ItemStack )
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid( ItemStack par1ItemStack )
|
||||
public boolean isItemValid( final ItemStack par1ItemStack )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public class SlotME extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putStack( ItemStack par1ItemStack )
|
||||
public void putStack( final ItemStack par1ItemStack )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -91,19 +91,19 @@ public class SlotME extends Slot
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize( int par1 )
|
||||
public ItemStack decrStackSize( final int par1 )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSlotInInventory( IInventory par1iInventory, int par2 )
|
||||
public boolean isSlotInInventory( final IInventory par1iInventory, final int par2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack( EntityPlayer par1EntityPlayer )
|
||||
public boolean canTakeStack( final EntityPlayer par1EntityPlayer )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -49,30 +49,30 @@ public class AppEngRenderItem extends RenderItem
|
||||
public IAEItemStack aeStack;
|
||||
|
||||
@Override
|
||||
public void renderItemOverlayIntoGUI( FontRenderer fontRenderer, TextureManager textureManager, ItemStack is, int par4, int par5, String par6Str )
|
||||
public void renderItemOverlayIntoGUI( final FontRenderer fontRenderer, final TextureManager textureManager, final ItemStack is, final int par4, final int par5, final String par6Str )
|
||||
{
|
||||
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.instance;
|
||||
int l = 255 - k << 16 | k << 8;
|
||||
int i1 = ( 255 - k ) / 4 << 16 | 16128;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
final int l = 255 - k << 16 | k << 8;
|
||||
final int i1 = ( 255 - k ) / 4 << 16 | 16128;
|
||||
this.renderQuad( tessellator, par4 + 2, par5 + 13, 13, 2, 0 );
|
||||
this.renderQuad( tessellator, par4 + 2, par5 + 13, 12, 1, i1 );
|
||||
this.renderQuad( tessellator, par4 + 2, par5 + 13, j1, 1, l );
|
||||
@@ -85,20 +85,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) par4 + offset + 16.0f - fontRenderer.getStringWidth( craftLabelText ) * scaleFactor ) * inverseScaleFactor );
|
||||
int Y = (int) ( ( (float) par5 + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
|
||||
final int X = (int) ( ( (float) par4 + offset + 16.0f - fontRenderer.getStringWidth( craftLabelText ) * scaleFactor ) * inverseScaleFactor );
|
||||
final int Y = (int) ( ( (float) par5 + 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 );
|
||||
@@ -107,8 +107,8 @@ public class AppEngRenderItem extends RenderItem
|
||||
GL11.glDisable( GL11.GL_DEPTH_TEST );
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScaled( scaleFactor, scaleFactor, scaleFactor );
|
||||
int X = (int) ( ( (float) par4 + offset + 16.0f - fontRenderer.getStringWidth( stackSize ) * scaleFactor ) * inverseScaleFactor );
|
||||
int Y = (int) ( ( (float) par5 + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
|
||||
final int X = (int) ( ( (float) par4 + offset + 16.0f - fontRenderer.getStringWidth( stackSize ) * scaleFactor ) * inverseScaleFactor );
|
||||
final int Y = (int) ( ( (float) par5 + offset + 16.0f - 7.0f * scaleFactor ) * inverseScaleFactor );
|
||||
fontRenderer.drawStringWithShadow( stackSize, X, Y, 16777215 );
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
@@ -119,7 +119,7 @@ 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 )
|
||||
{
|
||||
par1Tessellator.startDrawingQuads();
|
||||
par1Tessellator.setColorOpaque_I( par6 );
|
||||
@@ -130,7 +130,7 @@ public class AppEngRenderItem extends RenderItem
|
||||
par1Tessellator.draw();
|
||||
}
|
||||
|
||||
private String getToBeRenderedStackSize( long originalSize )
|
||||
private String getToBeRenderedStackSize( final long originalSize )
|
||||
{
|
||||
if( AEConfig.instance.useTerminalUseLargeFont() )
|
||||
{
|
||||
|
||||
@@ -69,7 +69,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;
|
||||
@@ -258,7 +258,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 );
|
||||
@@ -280,11 +280,11 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
return this.renderDistance;
|
||||
}
|
||||
|
||||
public void renderInventory( B block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] data )
|
||||
public void renderInventory( final B block, final ItemStack item, final RenderBlocks renderer, final ItemRenderType type, final Object[] data )
|
||||
{
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
BlockRenderInfo info = block.getRendererInstance();
|
||||
final BlockRenderInfo info = block.getRendererInstance();
|
||||
if( info.isValid() )
|
||||
{
|
||||
if( block.hasSubtypes() )
|
||||
@@ -312,7 +312,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( ForgeDirection in, ForgeDirection forward, ForgeDirection up )
|
||||
public static int getOrientation( final ForgeDirection in, final ForgeDirection forward, final ForgeDirection up )
|
||||
{
|
||||
if( in == null || in == ForgeDirection.UNKNOWN // 1
|
||||
|| forward == null || forward == ForgeDirection.UNKNOWN // 2
|
||||
@@ -321,14 +321,14 @@ 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<ForgeDirection> sides, B block, ItemStack item, Tessellator tess, int color, RenderBlocks renderer )
|
||||
public void renderInvBlock( final EnumSet<ForgeDirection> sides, final B block, final ItemStack item, final Tessellator tess, final int color, final RenderBlocks renderer )
|
||||
{
|
||||
int meta = 0;
|
||||
if( block != null && block.hasSubtypes() && item != null )
|
||||
@@ -391,9 +391,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
}
|
||||
|
||||
public IIcon firstNotNull( IIcon... s )
|
||||
public IIcon firstNotNull( final IIcon... s )
|
||||
{
|
||||
for( IIcon o : s )
|
||||
for( final IIcon o : s )
|
||||
{
|
||||
if( o != null )
|
||||
{
|
||||
@@ -403,25 +403,25 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
return ExtraBlockTextures.getMissing();
|
||||
}
|
||||
|
||||
public boolean renderInWorld( B block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final B block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
boolean o = renderer.renderStandardBlock( block, x, y, z );
|
||||
final boolean o = renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
this.postRenderInWorld( renderer );
|
||||
return o;
|
||||
}
|
||||
|
||||
public void preRenderInWorld( B block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public void preRenderInWorld( final B block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
|
||||
BlockRenderInfo info = block.getRendererInstance();
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
final BlockRenderInfo info = block.getRendererInstance();
|
||||
final IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
if( te != null )
|
||||
{
|
||||
ForgeDirection forward = te.getForward();
|
||||
ForgeDirection up = te.getUp();
|
||||
final ForgeDirection forward = te.getForward();
|
||||
final ForgeDirection up = te.getUp();
|
||||
|
||||
renderer.uvRotateBottom = info.getTexture( ForgeDirection.DOWN ).setFlip( getOrientation( ForgeDirection.DOWN, forward, up ) );
|
||||
renderer.uvRotateTop = info.getTexture( ForgeDirection.UP ).setFlip( getOrientation( ForgeDirection.UP, forward, up ) );
|
||||
@@ -434,29 +434,29 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
}
|
||||
|
||||
public void postRenderInWorld( RenderBlocks renderer )
|
||||
public void postRenderInWorld( final RenderBlocks renderer )
|
||||
{
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public IOrientable getOrientable( B block, IBlockAccess w, int x, int y, int z )
|
||||
public IOrientable getOrientable( final B block, final IBlockAccess w, final int x, final int y, final int z )
|
||||
{
|
||||
return block.getOrientable( w, x, y, z );
|
||||
}
|
||||
|
||||
protected void setInvRenderBounds( RenderBlocks renderer, int i, int j, int k, int l, int m, int n )
|
||||
protected void setInvRenderBounds( final RenderBlocks 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( RenderBlocks renderer,
|
||||
protected void renderBlockBounds( final RenderBlocks renderer,
|
||||
|
||||
double minX, double minY, double minZ,
|
||||
|
||||
double maxX, double maxY, double maxZ,
|
||||
|
||||
ForgeDirection x, ForgeDirection y, ForgeDirection z )
|
||||
final ForgeDirection x, final ForgeDirection y, final ForgeDirection z )
|
||||
{
|
||||
minX /= 16.0;
|
||||
minY /= 16.0;
|
||||
@@ -500,9 +500,9 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
protected void renderCutoutFace( B block, IIcon ico, int x, int y, int z, RenderBlocks renderer, ForgeDirection orientation, float edgeThickness )
|
||||
protected void renderCutoutFace( final B block, final IIcon ico, final int x, final int y, final int z, final RenderBlocks renderer, final ForgeDirection orientation, final float edgeThickness )
|
||||
{
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
double offsetX = 0.0;
|
||||
double offsetY = 0.0;
|
||||
@@ -565,8 +565,8 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
offsetY += y;
|
||||
offsetZ += z;
|
||||
|
||||
double layerBX = 0.0;
|
||||
double layerAY = 0.0;
|
||||
final double layerBX = 0.0;
|
||||
final double layerAY = 0.0;
|
||||
this.renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0, 1.0,
|
||||
@@ -593,7 +593,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
private void renderFace( Tessellator 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, IIcon ico, boolean flip )
|
||||
private void renderFace( final Tessellator 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 IIcon ico, final boolean flip )
|
||||
{
|
||||
if( flip )
|
||||
{
|
||||
@@ -612,7 +612,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
|
||||
@SideOnly( Side.CLIENT )
|
||||
protected void renderFace( int x, int y, int z, B block, IIcon ico, RenderBlocks renderer, ForgeDirection orientation )
|
||||
protected void renderFace( final int x, final int y, final int z, final B block, final IIcon ico, final RenderBlocks renderer, final ForgeDirection orientation )
|
||||
{
|
||||
switch( orientation )
|
||||
{
|
||||
@@ -639,18 +639,18 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
}
|
||||
}
|
||||
|
||||
public void selectFace( RenderBlocks renderer, ForgeDirection west, ForgeDirection up, ForgeDirection forward, int u1, int u2, int v1, int v2 )
|
||||
public void selectFace( final RenderBlocks renderer, final ForgeDirection west, final ForgeDirection up, final ForgeDirection forward, final int u1, final int u2, int v1, int v2 )
|
||||
{
|
||||
v1 = 16 - v1;
|
||||
v2 = 16 - v2;
|
||||
|
||||
double minX = ( forward.offsetX > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetX, u1 ) + this.mapFaceUV( up.offsetX, v1 );
|
||||
double minY = ( forward.offsetY > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetY, u1 ) + this.mapFaceUV( up.offsetY, v1 );
|
||||
double minZ = ( forward.offsetZ > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetZ, u1 ) + this.mapFaceUV( up.offsetZ, v1 );
|
||||
final double minX = ( forward.offsetX > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetX, u1 ) + this.mapFaceUV( up.offsetX, v1 );
|
||||
final double minY = ( forward.offsetY > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetY, u1 ) + this.mapFaceUV( up.offsetY, v1 );
|
||||
final double minZ = ( forward.offsetZ > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetZ, u1 ) + this.mapFaceUV( up.offsetZ, v1 );
|
||||
|
||||
double maxX = ( forward.offsetX > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetX, u2 ) + this.mapFaceUV( up.offsetX, v2 );
|
||||
double maxY = ( forward.offsetY > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetY, u2 ) + this.mapFaceUV( up.offsetY, v2 );
|
||||
double maxZ = ( forward.offsetZ > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetZ, u2 ) + this.mapFaceUV( up.offsetZ, v2 );
|
||||
final double maxX = ( forward.offsetX > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetX, u2 ) + this.mapFaceUV( up.offsetX, v2 );
|
||||
final double maxY = ( forward.offsetY > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetY, u2 ) + this.mapFaceUV( up.offsetY, v2 );
|
||||
final double maxZ = ( forward.offsetZ > 0 ? 1 : 0 ) + this.mapFaceUV( west.offsetZ, u2 ) + this.mapFaceUV( up.offsetZ, v2 );
|
||||
|
||||
renderer.renderMinX = Math.max( 0.0, Math.min( minX, maxX ) - ( forward.offsetX != 0 ? 0 : 0.001 ) );
|
||||
renderer.renderMaxX = Math.min( 1.0, Math.max( minX, maxX ) + ( forward.offsetX != 0 ? 0 : 0.001 ) );
|
||||
@@ -662,7 +662,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
renderer.renderMaxZ = Math.min( 1.0, Math.max( minZ, maxZ ) + ( forward.offsetZ != 0 ? 0 : 0.001 ) );
|
||||
}
|
||||
|
||||
private double mapFaceUV( int offset, int uv )
|
||||
private double mapFaceUV( final int offset, final int uv )
|
||||
{
|
||||
if( offset == 0 )
|
||||
{
|
||||
@@ -677,13 +677,12 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
return ( 16.0 - uv ) / 16.0;
|
||||
}
|
||||
|
||||
public void renderTile( B block, T tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderTile( final B block, final T tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateTop = renderer.uvRotateEast = renderer.uvRotateWest = renderer.uvRotateNorth = renderer.uvRotateSouth = 0;
|
||||
|
||||
ForgeDirection up = ForgeDirection.UP;
|
||||
ForgeDirection forward = ForgeDirection.SOUTH;
|
||||
final ForgeDirection up = ForgeDirection.UP;
|
||||
final ForgeDirection forward = ForgeDirection.SOUTH;
|
||||
this.applyTESRRotation( x, y, z, forward, up );
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
@@ -714,7 +713,7 @@ 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, ForgeDirection forward, ForgeDirection up )
|
||||
protected void applyTESRRotation( final double x, final double y, final double z, ForgeDirection forward, ForgeDirection up )
|
||||
{
|
||||
if( forward != null && up != null )
|
||||
{
|
||||
@@ -728,7 +727,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
|
||||
up = ForgeDirection.UP;
|
||||
}
|
||||
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
final ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
this.rotMat.put( 0, west.offsetX );
|
||||
this.rotMat.put( 1, west.offsetY );
|
||||
@@ -759,11 +758,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.getWorldObj(), 0.0D, 0.0D, 0.0D, itemstack );
|
||||
final EntityItem entityitem = new EntityItem( par1EntityItemFrame.getWorldObj(), 0.0D, 0.0D, 0.0D, itemstack );
|
||||
entityitem.getEntityItem().stackSize = 1;
|
||||
|
||||
// set all this stuff and then do shit? meh?
|
||||
|
||||
@@ -44,12 +44,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;
|
||||
@@ -59,7 +59,7 @@ public class BlockRenderInfo
|
||||
this.westIcon = west;
|
||||
}
|
||||
|
||||
public void setTemporaryRenderIcon( IIcon icon )
|
||||
public void setTemporaryRenderIcon( final IIcon icon )
|
||||
{
|
||||
if( icon == null )
|
||||
{
|
||||
@@ -77,7 +77,7 @@ public class BlockRenderInfo
|
||||
}
|
||||
}
|
||||
|
||||
public void setTemporaryRenderIcons( IIcon nTopIcon, IIcon nBottomIcon, IIcon nSouthIcon, IIcon nNorthIcon, IIcon nEastIcon, IIcon nWestIcon )
|
||||
public void setTemporaryRenderIcons( final IIcon nTopIcon, final IIcon nBottomIcon, final IIcon nSouthIcon, final IIcon nNorthIcon, final IIcon nEastIcon, final IIcon nWestIcon )
|
||||
{
|
||||
this.tmpTopIcon.setOriginal( nTopIcon == null ? this.getTexture( ForgeDirection.UP ) : nTopIcon );
|
||||
this.tmpBottomIcon.setOriginal( nBottomIcon == null ? this.getTexture( ForgeDirection.DOWN ) : nBottomIcon );
|
||||
@@ -88,7 +88,7 @@ public class BlockRenderInfo
|
||||
this.useTmp = true;
|
||||
}
|
||||
|
||||
public FlippableIcon getTexture( ForgeDirection dir )
|
||||
public FlippableIcon getTexture( final ForgeDirection dir )
|
||||
{
|
||||
if( this.useTmp )
|
||||
{
|
||||
|
||||
@@ -100,14 +100,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( ForgeDirection side )
|
||||
public double getBound( final ForgeDirection side )
|
||||
{
|
||||
switch( side )
|
||||
{
|
||||
@@ -129,16 +129,16 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
}
|
||||
}
|
||||
|
||||
public void setRenderColor( int color )
|
||||
public void setRenderColor( final int color )
|
||||
{
|
||||
for( Block block : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
|
||||
for( final Block block : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
|
||||
{
|
||||
final BlockCableBus cableBus = (BlockCableBus) block;
|
||||
cableBus.setRenderColor( color );
|
||||
}
|
||||
}
|
||||
|
||||
public void setOrientation( ForgeDirection dx, ForgeDirection dy, ForgeDirection dz )
|
||||
public void setOrientation( final ForgeDirection dx, final ForgeDirection dy, final ForgeDirection dz )
|
||||
{
|
||||
this.ax = dx == null ? ForgeDirection.EAST : dx;
|
||||
this.ay = dy == null ? ForgeDirection.UP : dy;
|
||||
@@ -150,7 +150,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 )
|
||||
{
|
||||
@@ -178,13 +178,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 )
|
||||
{
|
||||
@@ -236,7 +236,7 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
{
|
||||
@Nullable
|
||||
@Override
|
||||
public AEBaseBlock apply( Block input )
|
||||
public AEBaseBlock apply( final Block input )
|
||||
{
|
||||
if( input instanceof AEBaseBlock )
|
||||
{
|
||||
@@ -248,7 +248,7 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderForPass( int pass )
|
||||
public void renderForPass( final int pass )
|
||||
{
|
||||
this.renderingForPass = pass;
|
||||
}
|
||||
@@ -266,16 +266,16 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void normalRendering()
|
||||
{
|
||||
RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
final RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
rbw.calculations = true;
|
||||
rbw.useTextures = true;
|
||||
rbw.enableAO = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISimplifiedBundle useSimplifiedRendering( int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim )
|
||||
public ISimplifiedBundle useSimplifiedRendering( final int x, final int y, final int z, final IBoxProvider p, final ISimplifiedBundle sim )
|
||||
{
|
||||
RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
final RenderBlocksWorkaround rbw = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
if( sim != null && this.maybeBlock.isPresent() && rbw.similarLighting( this.maybeBlock.get(), rbw.blockAccess, x, y, z, sim ) )
|
||||
{
|
||||
@@ -288,7 +288,7 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
boolean allFaces = rbw.renderAllFaces;
|
||||
final boolean allFaces = rbw.renderAllFaces;
|
||||
rbw.renderAllFaces = true;
|
||||
rbw.calculations = true;
|
||||
rbw.faces.clear();
|
||||
@@ -334,7 +334,7 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
|
||||
this.bbr.renderBlockBounds( rbw, this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, this.ax, this.ay, this.az );
|
||||
|
||||
for( Block block : this.maybeBlock.asSet() )
|
||||
for( final Block block : this.maybeBlock.asSet() )
|
||||
{
|
||||
rbw.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
@@ -349,7 +349,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;
|
||||
@@ -360,24 +360,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( IIcon ico )
|
||||
public void setTexture( final IIcon ico )
|
||||
{
|
||||
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
|
||||
for( final AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
|
||||
{
|
||||
baseBlock.getRendererInstance().setTemporaryRenderIcon( ico );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTexture( IIcon down, IIcon up, IIcon north, IIcon south, IIcon west, IIcon east )
|
||||
public void setTexture( final IIcon down, final IIcon up, final IIcon north, final IIcon south, final IIcon west, final IIcon east )
|
||||
{
|
||||
IIcon[] list = new IIcon[6];
|
||||
final IIcon[] list = new IIcon[6];
|
||||
|
||||
list[0] = down;
|
||||
list[1] = up;
|
||||
@@ -386,28 +386,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( ForgeDirection.UP ).ordinal()], list[this.mapRotation( ForgeDirection.DOWN ).ordinal()], list[this.mapRotation( ForgeDirection.SOUTH ).ordinal()], list[this.mapRotation( ForgeDirection.NORTH ).ordinal()], list[this.mapRotation( ForgeDirection.EAST ).ordinal()], list[this.mapRotation( ForgeDirection.WEST ).ordinal()] );
|
||||
}
|
||||
}
|
||||
|
||||
public ForgeDirection mapRotation( ForgeDirection dir )
|
||||
public ForgeDirection mapRotation( final ForgeDirection dir )
|
||||
{
|
||||
ForgeDirection forward = this.az;
|
||||
ForgeDirection up = this.ay;
|
||||
final ForgeDirection forward = this.az;
|
||||
final ForgeDirection up = this.ay;
|
||||
|
||||
if( forward == null || up == null )
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
|
||||
int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
||||
int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
||||
int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
||||
final int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
||||
final int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
||||
final int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
||||
|
||||
ForgeDirection west = ForgeDirection.UNKNOWN;
|
||||
for( ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||
{
|
||||
@@ -446,43 +446,43 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBox( RenderBlocks renderer )
|
||||
public void renderInventoryBox( final RenderBlocks 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( ForgeDirection.class ), baseBlock, null, Tessellator.instance, this.color, renderer );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryFace( IIcon icon, ForgeDirection face, RenderBlocks renderer )
|
||||
public void renderInventoryFace( final IIcon icon, final ForgeDirection face, final RenderBlocks 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( face ), baseBlock, null, Tessellator.instance, this.color, renderer );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBlock( int x, int y, int z, RenderBlocks renderer )
|
||||
public void renderBlock( final int x, final int y, final int z, final RenderBlocks 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();
|
||||
ForgeDirection forward = BusRenderHelper.INSTANCE.az;
|
||||
ForgeDirection up = BusRenderHelper.INSTANCE.ay;
|
||||
final BlockRenderInfo info = block.getRendererInstance();
|
||||
final ForgeDirection forward = BusRenderHelper.INSTANCE.az;
|
||||
final ForgeDirection up = BusRenderHelper.INSTANCE.ay;
|
||||
|
||||
renderer.uvRotateBottom = info.getTexture( ForgeDirection.DOWN ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.DOWN, forward, up ) );
|
||||
renderer.uvRotateTop = info.getTexture( ForgeDirection.UP ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.UP, forward, up ) );
|
||||
@@ -502,7 +502,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;
|
||||
}
|
||||
@@ -510,33 +510,33 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
throw new MissingDefinition( "Tried to access the multi part block without it being defined." );
|
||||
}
|
||||
|
||||
public void prepareBounds( RenderBlocks renderer )
|
||||
public void prepareBounds( final RenderBlocks 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<ForgeDirection> faces )
|
||||
public void setFacesToRender( final EnumSet<ForgeDirection> faces )
|
||||
{
|
||||
BusRenderer.INSTANCE.renderer.renderFaces = faces;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBlockCurrentBounds( int x, int y, int z, RenderBlocks renderer )
|
||||
public void renderBlockCurrentBounds( final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for( Block block : this.maybeBlock.asSet() )
|
||||
for( final Block block : this.maybeBlock.asSet() )
|
||||
{
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceCutout( int x, int y, int z, IIcon ico, ForgeDirection face, float edgeThickness, RenderBlocks renderer )
|
||||
public void renderFaceCutout( final int x, final int y, final int z, final IIcon ico, ForgeDirection face, final float edgeThickness, final RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
@@ -569,14 +569,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, x, y, z, renderer, face, edgeThickness );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFace( int x, int y, int z, IIcon ico, ForgeDirection face, RenderBlocks renderer )
|
||||
public void renderFace( final int x, final int y, final int z, final IIcon ico, ForgeDirection face, final RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
@@ -610,7 +610,7 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
break;
|
||||
}
|
||||
|
||||
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
|
||||
for( final AEBaseBlock block : this.maybeBaseBlock.asSet() )
|
||||
{
|
||||
this.bbr.renderFace( x, y, z, block, ico, renderer, face );
|
||||
}
|
||||
|
||||
@@ -54,19 +54,19 @@ public class BusRenderer implements IItemRenderer
|
||||
public final RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
|
||||
|
||||
@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 )
|
||||
{
|
||||
@@ -130,8 +130,8 @@ public class BusRenderer implements IItemRenderer
|
||||
|
||||
if( item.getItem() instanceof IFacadeItem )
|
||||
{
|
||||
IFacadeItem fi = (IFacadeItem) item.getItem();
|
||||
IFacadePart fp = fi.createPartFromItemStack( item, ForgeDirection.SOUTH );
|
||||
final IFacadeItem fi = (IFacadeItem) item.getItem();
|
||||
final IFacadePart fp = fi.createPartFromItemStack( item, ForgeDirection.SOUTH );
|
||||
|
||||
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
||||
{
|
||||
@@ -146,12 +146,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 );
|
||||
}
|
||||
|
||||
@@ -166,9 +166,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 )
|
||||
|
||||
@@ -45,10 +45,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();
|
||||
RenderBlocksWorkaround renderer = BusRenderer.INSTANCE.renderer;
|
||||
final TileEntity te = cableBusContainer.getTile();
|
||||
final RenderBlocksWorkaround renderer = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
if( renderer.overrideBlockTexture != null )
|
||||
{
|
||||
@@ -60,9 +60,9 @@ public class CableRenderHelper
|
||||
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
|
||||
}
|
||||
|
||||
for( ForgeDirection s : ForgeDirection.values() )
|
||||
for( final ForgeDirection s : ForgeDirection.values() )
|
||||
{
|
||||
IPart part = cableBusContainer.getPart( s );
|
||||
final IPart part = cableBusContainer.getPart( s );
|
||||
if( part != null )
|
||||
{
|
||||
this.setSide( s );
|
||||
@@ -84,24 +84,24 @@ public class CableRenderHelper
|
||||
/**
|
||||
* snag list of boxes...
|
||||
*/
|
||||
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
|
||||
for( ForgeDirection s : ForgeDirection.values() )
|
||||
final List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
|
||||
for( final ForgeDirection s : ForgeDirection.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;
|
||||
@@ -117,15 +117,15 @@ public class CableRenderHelper
|
||||
}
|
||||
}
|
||||
|
||||
for( ForgeDirection s : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection s : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
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();
|
||||
AxisAlignedBB b = null;
|
||||
for( AxisAlignedBB bb : boxes )
|
||||
for( final AxisAlignedBB bb : boxes )
|
||||
{
|
||||
if( bb.intersectsWith( pb ) )
|
||||
{
|
||||
@@ -160,11 +160,11 @@ public class CableRenderHelper
|
||||
}
|
||||
}
|
||||
|
||||
private void setSide( ForgeDirection s )
|
||||
private void setSide( final ForgeDirection s )
|
||||
{
|
||||
ForgeDirection ax;
|
||||
ForgeDirection ay;
|
||||
ForgeDirection az;
|
||||
final ForgeDirection ax;
|
||||
final ForgeDirection ay;
|
||||
final ForgeDirection az;
|
||||
|
||||
switch( s )
|
||||
{
|
||||
@@ -209,16 +209,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( ForgeDirection s : ForgeDirection.values() )
|
||||
for( final ForgeDirection s : ForgeDirection.values() )
|
||||
{
|
||||
IPart part = cableBusContainer.getPart( s );
|
||||
final IPart part = cableBusContainer.getPart( s );
|
||||
if( part != null )
|
||||
{
|
||||
ForgeDirection ax;
|
||||
ForgeDirection ay;
|
||||
ForgeDirection az;
|
||||
final ForgeDirection ax;
|
||||
final ForgeDirection ay;
|
||||
final ForgeDirection az;
|
||||
|
||||
switch( s )
|
||||
{
|
||||
|
||||
@@ -31,19 +31,19 @@ public class ItemRenderer implements IItemRenderer
|
||||
public static final ItemRenderer INSTANCE = new ItemRenderer();
|
||||
|
||||
@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 )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
@@ -62,7 +62,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
{
|
||||
this.fColor = Tessellator.class.getDeclaredField( "color" );
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
this.fColor = Tessellator.class.getDeclaredField( "field_78402_m" );
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
return (Integer) this.fColor.get( Tessellator.instance );
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
{
|
||||
this.fBrightness = Tessellator.class.getDeclaredField( "brightness" );
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
this.fBrightness = Tessellator.class.getDeclaredField( "field_78401_l" );
|
||||
}
|
||||
@@ -94,18 +94,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
return (Integer) this.fBrightness.get( Tessellator.instance );
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void setTexture( IIcon ico )
|
||||
public void setTexture( final IIcon ico )
|
||||
{
|
||||
this.lightState.rXPos = this.lightState.rXNeg = this.lightState.rYPos = this.lightState.rYNeg = this.lightState.rZPos = this.lightState.rZNeg = ico;
|
||||
}
|
||||
|
||||
public void setTexture( IIcon rYNeg, IIcon rYPos, IIcon rZNeg, IIcon rZPos, IIcon rXNeg, IIcon rXPos )
|
||||
public void setTexture( final IIcon rYNeg, final IIcon rYPos, final IIcon rZNeg, final IIcon rZPos, final IIcon rXNeg, final IIcon rXPos )
|
||||
{
|
||||
this.lightState.rXPos = rXPos;
|
||||
this.lightState.rXNeg = rXNeg;
|
||||
@@ -115,7 +115,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
this.lightState.rZNeg = rZNeg;
|
||||
}
|
||||
|
||||
public boolean renderStandardBlockNoCalculations( Block b, int x, int y, int z )
|
||||
public boolean renderStandardBlockNoCalculations( final Block b, final int x, final int y, final int z )
|
||||
{
|
||||
Tessellator.instance.setBrightness( this.lightState.bXPos );
|
||||
this.restoreAO( this.lightState.aoXPos, this.lightState.foXPos );
|
||||
@@ -144,7 +144,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
return true;
|
||||
}
|
||||
|
||||
private void restoreAO( int[] z, float[] c )
|
||||
private void restoreAO( final int[] z, final float[] c )
|
||||
{
|
||||
this.brightnessBottomLeft = z[0];
|
||||
this.brightnessBottomRight = z[1];
|
||||
@@ -166,7 +166,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
this.colorBlueTopRight = c[11];
|
||||
}
|
||||
|
||||
private void saveAO( int[] z, float[] c )
|
||||
private void saveAO( final int[] z, final float[] c )
|
||||
{
|
||||
z[0] = this.brightnessBottomLeft;
|
||||
z[1] = this.brightnessBottomRight;
|
||||
@@ -189,7 +189,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderStandardBlock( Block blk, int x, int y, int z )
|
||||
public boolean renderStandardBlock( final Block blk, final int x, final int y, final int z )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -201,12 +201,12 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
else
|
||||
{
|
||||
this.enableAO = this.lightState.isAO;
|
||||
boolean out = this.renderStandardBlockNoCalculations( blk, x, y, z );
|
||||
final boolean out = this.renderStandardBlockNoCalculations( blk, x, y, z );
|
||||
this.enableAO = false;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( final Throwable t )
|
||||
{
|
||||
AELog.error( t );
|
||||
// meh
|
||||
@@ -215,7 +215,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceYNeg( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.DOWN ) )
|
||||
{
|
||||
@@ -226,18 +226,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
double d13 = par4 + this.renderMinY;
|
||||
double d14 = par6 + this.renderMinZ;
|
||||
double d15 = par6 + this.renderMaxZ;
|
||||
final double d11 = par2 + this.renderMinX;
|
||||
final double d12 = par2 + this.renderMaxX;
|
||||
final double d13 = par4 + this.renderMinY;
|
||||
final double d14 = par6 + this.renderMinZ;
|
||||
final double d15 = par6 + this.renderMaxZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -273,7 +273,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceYPos( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.UP ) )
|
||||
{
|
||||
@@ -284,18 +284,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( this.renderMinZ * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( this.renderMaxZ * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
double d13 = par4 + this.renderMaxY;
|
||||
double d14 = par6 + this.renderMinZ;
|
||||
double d15 = par6 + this.renderMaxZ;
|
||||
final double d11 = par2 + this.renderMinX;
|
||||
final double d12 = par2 + this.renderMaxX;
|
||||
final double d13 = par4 + this.renderMaxY;
|
||||
final double d14 = par6 + this.renderMinZ;
|
||||
final double d15 = par6 + this.renderMaxZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -331,7 +331,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceZNeg( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.NORTH ) )
|
||||
{
|
||||
@@ -342,18 +342,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinX * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxX * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
double d13 = par4 + this.renderMinY;
|
||||
double d14 = par4 + this.renderMaxY;
|
||||
double d15 = par6 + this.renderMinZ;
|
||||
final double d11 = par2 + this.renderMinX;
|
||||
final double d12 = par2 + this.renderMaxX;
|
||||
final double d13 = par4 + this.renderMinY;
|
||||
final double d14 = par4 + this.renderMaxY;
|
||||
final double d15 = par6 + this.renderMinZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -389,7 +389,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceZPos( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.SOUTH ) )
|
||||
{
|
||||
@@ -400,18 +400,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( this.renderMinX * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( this.renderMaxX * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par2 + this.renderMaxX;
|
||||
double d13 = par4 + this.renderMinY;
|
||||
double d14 = par4 + this.renderMaxY;
|
||||
double d15 = par6 + this.renderMaxZ;
|
||||
final double d11 = par2 + this.renderMinX;
|
||||
final double d12 = par2 + this.renderMaxX;
|
||||
final double d13 = par4 + this.renderMinY;
|
||||
final double d14 = par4 + this.renderMaxY;
|
||||
final double d15 = par6 + this.renderMaxZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -447,7 +447,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceXNeg( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.WEST ) )
|
||||
{
|
||||
@@ -458,18 +458,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( this.renderMinZ * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( this.renderMaxZ * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMinX;
|
||||
double d12 = par4 + this.renderMinY;
|
||||
double d13 = par4 + this.renderMaxY;
|
||||
double d14 = par6 + this.renderMinZ;
|
||||
double d15 = par6 + this.renderMaxZ;
|
||||
final double d11 = par2 + this.renderMinX;
|
||||
final double d12 = par4 + this.renderMinY;
|
||||
final double d13 = par4 + this.renderMaxY;
|
||||
final double d14 = par6 + this.renderMinZ;
|
||||
final double d15 = par6 + this.renderMaxZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -505,7 +505,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos( Block par1Block, double par2, double par4, double par6, IIcon par8Icon )
|
||||
public void renderFaceXPos( final Block par1Block, final double par2, final double par4, final double par6, final IIcon par8Icon )
|
||||
{
|
||||
if( this.faces.contains( ForgeDirection.EAST ) )
|
||||
{
|
||||
@@ -516,18 +516,18 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
|
||||
double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
|
||||
double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
final double d3 = par8Icon.getInterpolatedU( 16.0D - this.renderMinZ * 16.0D );
|
||||
final double d4 = par8Icon.getInterpolatedU( 16.0D - this.renderMaxZ * 16.0D );
|
||||
final double d5 = par8Icon.getInterpolatedV( 16.0D - this.renderMaxY * 16.0D );
|
||||
final double d6 = par8Icon.getInterpolatedV( 16.0D - this.renderMinY * 16.0D );
|
||||
|
||||
double d11 = par2 + this.renderMaxX;
|
||||
double d12 = par4 + this.renderMinY;
|
||||
double d13 = par4 + this.renderMaxY;
|
||||
double d14 = par6 + this.renderMinZ;
|
||||
double d15 = par6 + this.renderMaxZ;
|
||||
final double d11 = par2 + this.renderMaxX;
|
||||
final double d12 = par4 + this.renderMinY;
|
||||
final double d13 = par4 + this.renderMaxY;
|
||||
final double d14 = par6 + this.renderMinZ;
|
||||
final double d15 = par6 + this.renderMaxZ;
|
||||
|
||||
if( this.enableAO )
|
||||
{
|
||||
@@ -562,41 +562,41 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
|
||||
private void partialLightingColoring( double u, double v )
|
||||
private void partialLightingColoring( final double u, final double v )
|
||||
{
|
||||
double rA = this.colorRedTopLeft * u + ( 1.0 - u ) * this.colorRedTopRight;
|
||||
double rB = this.colorRedBottomLeft * u + ( 1.0 - u ) * this.colorRedBottomRight;
|
||||
float r = (float) ( rA * v + rB * ( 1.0 - v ) );
|
||||
final double rA = this.colorRedTopLeft * u + ( 1.0 - u ) * this.colorRedTopRight;
|
||||
final double rB = this.colorRedBottomLeft * u + ( 1.0 - u ) * this.colorRedBottomRight;
|
||||
final float r = (float) ( rA * v + rB * ( 1.0 - v ) );
|
||||
|
||||
double gA = this.colorGreenTopLeft * u + ( 1.0 - u ) * this.colorGreenTopRight;
|
||||
double gB = this.colorGreenBottomLeft * u + ( 1.0 - u ) * this.colorGreenBottomRight;
|
||||
float g = (float) ( gA * v + gB * ( 1.0 - v ) );
|
||||
final double gA = this.colorGreenTopLeft * u + ( 1.0 - u ) * this.colorGreenTopRight;
|
||||
final double gB = this.colorGreenBottomLeft * u + ( 1.0 - u ) * this.colorGreenBottomRight;
|
||||
final float g = (float) ( gA * v + gB * ( 1.0 - v ) );
|
||||
|
||||
double bA = this.colorBlueTopLeft * u + ( 1.0 - u ) * this.colorBlueTopRight;
|
||||
double bB = this.colorBlueBottomLeft * u + ( 1.0 - u ) * this.colorBlueBottomRight;
|
||||
float b = (float) ( bA * v + bB * ( 1.0 - v ) );
|
||||
final double bA = this.colorBlueTopLeft * u + ( 1.0 - u ) * this.colorBlueTopRight;
|
||||
final double bB = this.colorBlueBottomLeft * u + ( 1.0 - u ) * this.colorBlueBottomRight;
|
||||
final float b = (float) ( bA * v + bB * ( 1.0 - v ) );
|
||||
|
||||
double highA = ( this.brightnessTopLeft >> 16 & 255 ) * u + ( 1.0 - u ) * ( this.brightnessTopRight >> 16 & 255 );
|
||||
double highB = ( this.brightnessBottomLeft >> 16 & 255 ) * u + ( 1.0 - u ) * ( this.brightnessBottomRight >> 16 & 255 );
|
||||
int high = ( (int) ( highA * v + highB * ( 1.0 - v ) ) ) & 255;
|
||||
final double highA = ( this.brightnessTopLeft >> 16 & 255 ) * u + ( 1.0 - u ) * ( this.brightnessTopRight >> 16 & 255 );
|
||||
final double highB = ( this.brightnessBottomLeft >> 16 & 255 ) * u + ( 1.0 - u ) * ( this.brightnessBottomRight >> 16 & 255 );
|
||||
final int high = ( (int) ( highA * v + highB * ( 1.0 - v ) ) ) & 255;
|
||||
|
||||
double lowA = ( ( this.brightnessTopLeft & 255 ) ) * u + ( 1.0 - u ) * ( ( this.brightnessTopRight & 255 ) );
|
||||
double lowB = ( ( this.brightnessBottomLeft & 255 ) ) * u + ( 1.0 - u ) * ( ( this.brightnessBottomRight & 255 ) );
|
||||
int low = ( (int) ( lowA * v + lowB * ( 1.0 - v ) ) ) & 255;
|
||||
final double lowA = ( ( this.brightnessTopLeft & 255 ) ) * u + ( 1.0 - u ) * ( ( this.brightnessTopRight & 255 ) );
|
||||
final double lowB = ( ( this.brightnessBottomLeft & 255 ) ) * u + ( 1.0 - u ) * ( ( this.brightnessBottomRight & 255 ) );
|
||||
final int low = ( (int) ( lowA * v + lowB * ( 1.0 - v ) ) ) & 255;
|
||||
|
||||
int out = ( high << 16 ) | low;
|
||||
final int out = ( high << 16 ) | low;
|
||||
|
||||
Tessellator.instance.setColorRGBA_F( r, g, b, this.opacity );
|
||||
Tessellator.instance.setBrightness( out );
|
||||
}
|
||||
|
||||
public boolean similarLighting( Block blk, IBlockAccess w, int x, int y, int z, ISimplifiedBundle sim )
|
||||
public boolean similarLighting( final Block blk, final IBlockAccess w, final int x, final int y, final int z, final ISimplifiedBundle sim )
|
||||
{
|
||||
int lh = this.getLightingHash( blk, w, x, y, z );
|
||||
final int lh = this.getLightingHash( blk, w, x, y, z );
|
||||
return ( (LightingCache) sim ).lightHash == lh;
|
||||
}
|
||||
|
||||
private int getLightingHash( Block blk, IBlockAccess w, int x, int y, int z )
|
||||
private int getLightingHash( final Block blk, final IBlockAccess w, final int x, final int y, final int z )
|
||||
{
|
||||
int o = 0;
|
||||
|
||||
@@ -616,7 +616,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
return Arrays.hashCode( this.lightHashTmp );
|
||||
}
|
||||
|
||||
public void populate( ISimplifiedBundle sim )
|
||||
public void populate( final ISimplifiedBundle sim )
|
||||
{
|
||||
this.lightState = new LightingCache( (LightingCache) sim );
|
||||
}
|
||||
@@ -656,7 +656,7 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
public int bZNeg;
|
||||
public int lightHash;
|
||||
|
||||
public LightingCache( LightingCache secondCSrc )
|
||||
public LightingCache( final LightingCache secondCSrc )
|
||||
{
|
||||
this.rXPos = secondCSrc.rXPos;
|
||||
this.rXNeg = secondCSrc.rXNeg;
|
||||
|
||||
@@ -52,9 +52,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;
|
||||
@@ -74,7 +74,7 @@ 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.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
for( int i = 0; i < 6; ++i )
|
||||
{
|
||||
@@ -142,7 +142,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
|
||||
private void renderTwinkles()
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
for( int i = 0; i < 50; ++i )
|
||||
@@ -150,7 +150,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 )
|
||||
@@ -159,30 +159,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;
|
||||
tessellator.addVertex( x + d24, y + d22, z + d25 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,18 +44,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 )
|
||||
public final void renderTileEntityAt( final TileEntity te, final double x, final double y, final double z, final float f )
|
||||
{
|
||||
if( te instanceof AEBaseTile )
|
||||
{
|
||||
Block b = te.getBlockType();
|
||||
final Block b = te.getBlockType();
|
||||
|
||||
if( b instanceof AEBaseBlock && ( (AEBaseTile) te ).requiresTESR() )
|
||||
{
|
||||
@@ -64,7 +64,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
return;
|
||||
}
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -75,7 +75,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();
|
||||
|
||||
@@ -50,27 +50,27 @@ 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, RenderBlocks renderer )
|
||||
public void renderInventoryBlock( final Block block, final int metadata, final int modelID, final RenderBlocks renderer )
|
||||
{
|
||||
// wtf is this for?
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock( IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer )
|
||||
public boolean renderWorldBlock( final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId, final RenderBlocks renderer )
|
||||
{
|
||||
AEBaseBlock blk = (AEBaseBlock) block;
|
||||
final AEBaseBlock blk = (AEBaseBlock) block;
|
||||
renderer.setRenderBoundsFromBlock( block );
|
||||
return this.getRender( blk ).renderInWorld( blk, world, x, y, z, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory( int modelId )
|
||||
public boolean shouldRender3DInInventory( final int modelId )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -81,17 +81,17 @@ public final class WorldRender implements ISimpleBlockRenderingHandler
|
||||
return this.renderID;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockMolecularAssembler blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockMolecularAssembler blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.setOverrideBlockTexture( blk.getIcon( 0, 0 ) );
|
||||
|
||||
@@ -103,16 +103,16 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockMolecularAssembler maBlock, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockMolecularAssembler maBlock, final IBlockAccess world, final int x, final int y, final int z, RenderBlocks renderer )
|
||||
{
|
||||
TileMolecularAssembler tma = maBlock.getTileEntity( world, x, y, z );
|
||||
final TileMolecularAssembler tma = maBlock.getTileEntity( world, x, y, z );
|
||||
|
||||
if( BlockMolecularAssembler.booleanAlphaPass )
|
||||
{
|
||||
if( tma.isPowered() )
|
||||
{
|
||||
this.renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
|
||||
final TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
|
||||
Tessellator.instance.setColorRGBA_F( 1, 1, 1, 0.3f );
|
||||
Tessellator.instance.setBrightness( 14 << 20 | 14 << 4 );
|
||||
renderer.renderFaceXNeg( maBlock, x, y, z, lights );
|
||||
@@ -134,11 +134,11 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
tma.lightCache = BusRenderHelper.INSTANCE.useSimplifiedRendering( x, y, z, this, tma.lightCache );
|
||||
|
||||
BusRenderer.INSTANCE.renderer.isFacade = true;
|
||||
IOrientable te = this.getOrientable( maBlock, world, x, y, z );
|
||||
final IOrientable te = this.getOrientable( maBlock, world, x, y, z );
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
ForgeDirection fdz = te.getForward();
|
||||
ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
|
||||
final ForgeDirection fdy = te.getUp();
|
||||
final ForgeDirection fdz = te.getForward();
|
||||
final ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
@@ -199,7 +199,7 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
return true;
|
||||
}
|
||||
|
||||
public void renderCableAt( double thickness, IBlockAccess world, int x, int y, int z, BlockMolecularAssembler block, RenderBlocks renderer, double pull, boolean covered )
|
||||
public void renderCableAt( final double thickness, final IBlockAccess world, final int x, final int y, final int z, final BlockMolecularAssembler block, final RenderBlocks renderer, final double pull, final boolean covered )
|
||||
{
|
||||
IIcon texture = null;
|
||||
|
||||
@@ -248,19 +248,19 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
block.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
}
|
||||
|
||||
IIcon getConnectedCable( IBlockAccess world, int x, int y, int z, ForgeDirection side, boolean covered )
|
||||
IIcon getConnectedCable( final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection side, final boolean covered )
|
||||
{
|
||||
final int tileYPos = y + side.offsetY;
|
||||
if( -1 < tileYPos && tileYPos < 256 )
|
||||
{
|
||||
TileEntity ne = world.getTileEntity( x + side.offsetX, tileYPos, z + side.offsetZ );
|
||||
final TileEntity ne = world.getTileEntity( x + side.offsetX, tileYPos, z + side.offsetZ );
|
||||
if( ne instanceof IGridHost && ne instanceof IPartHost )
|
||||
{
|
||||
IPartHost ph = (IPartHost) ne;
|
||||
IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
|
||||
final IPartHost ph = (IPartHost) ne;
|
||||
final IPart pcx = ph.getPart( ForgeDirection.UNKNOWN );
|
||||
if( pcx instanceof PartCable )
|
||||
{
|
||||
PartCable pc = (PartCable) pcx;
|
||||
final PartCable pc = (PartCable) pcx;
|
||||
if( pc.isConnected( side.getOpposite() ) )
|
||||
{
|
||||
if( covered )
|
||||
@@ -277,7 +277,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 );
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockCharger blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockCharger blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockCharger block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockCharger block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
@@ -122,7 +122,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockCharger block, TileCharger tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderTile( final BlockCharger block, final TileCharger tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
final ItemStack sis = tile.getStackInSlot( 0 );
|
||||
|
||||
@@ -160,7 +160,7 @@ public class RenderBlockCharger extends BaseBlockRender<BlockCharger, TileCharge
|
||||
|
||||
this.doRenderItem( sis, tile );
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
AELog.error( err );
|
||||
}
|
||||
|
||||
@@ -39,16 +39,16 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockController blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockController blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
|
||||
boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
boolean yy = this.getTileEntity( world, x, y - 1, z ) instanceof TileController && this.getTileEntity( world, x, y + 1, z ) instanceof TileController;
|
||||
boolean zz = this.getTileEntity( world, x, y, z - 1 ) instanceof TileController && this.getTileEntity( world, x, y, z + 1 ) instanceof TileController;
|
||||
final boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
final boolean yy = this.getTileEntity( world, x, y - 1, z ) instanceof TileController && this.getTileEntity( world, x, y + 1, z ) instanceof TileController;
|
||||
final boolean zz = this.getTileEntity( world, x, y, z - 1 ) instanceof TileController && this.getTileEntity( world, x, y, z + 1 ) instanceof TileController;
|
||||
|
||||
int meta = world.getBlockMetadata( x, y, z );
|
||||
boolean hasPower = meta > 0;
|
||||
boolean isConflict = meta == 2;
|
||||
final int meta = world.getBlockMetadata( x, y, z );
|
||||
final boolean hasPower = meta > 0;
|
||||
final boolean isConflict = meta == 2;
|
||||
|
||||
ExtraBlockTextures lights = null;
|
||||
|
||||
@@ -123,7 +123,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
|
||||
}
|
||||
else if( ( xx ? 1 : 0 ) + ( yy ? 1 : 0 ) + ( zz ? 1 : 0 ) >= 2 )
|
||||
{
|
||||
int v = ( Math.abs( x ) + Math.abs( y ) + Math.abs( z ) ) % 2;
|
||||
final int v = ( Math.abs( x ) + Math.abs( y ) + Math.abs( z ) ) % 2;
|
||||
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
if( v == 0 )
|
||||
@@ -155,7 +155,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
|
||||
}
|
||||
}
|
||||
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
final boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
if( lights != null )
|
||||
{
|
||||
Tessellator.instance.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
|
||||
@@ -173,7 +173,7 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
|
||||
return out;
|
||||
}
|
||||
|
||||
private TileEntity getTileEntity( IBlockAccess world, int x, int y, int z )
|
||||
private TileEntity getTileEntity( final IBlockAccess world, final int x, final int y, final int z )
|
||||
{
|
||||
if( y >= 0 )
|
||||
{
|
||||
|
||||
@@ -44,7 +44,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 );
|
||||
}
|
||||
@@ -55,26 +55,26 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( B blk, IBlockAccess w, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final B blk, final IBlockAccess w, final int x, final int y, final int z, RenderBlocks renderer )
|
||||
{
|
||||
boolean formed = false;
|
||||
boolean emitsLight = false;
|
||||
|
||||
TileCraftingTile ct = blk.getTileEntity( w, x, y, z );
|
||||
final TileCraftingTile ct = blk.getTileEntity( w, x, y, z );
|
||||
if( ct != null && ct.isFormed() )
|
||||
{
|
||||
formed = true;
|
||||
emitsLight = ct.isPowered();
|
||||
}
|
||||
int meta = w.getBlockMetadata( x, y, z ) & 3;
|
||||
final int meta = w.getBlockMetadata( x, y, z ) & 3;
|
||||
|
||||
boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
|
||||
IIcon theIcon = blk.getIcon( ForgeDirection.SOUTH.ordinal(), meta | ( formed ? 8 : 0 ) );
|
||||
final boolean isMonitor = blk.getClass() == BlockCraftingMonitor.class;
|
||||
final IIcon theIcon = blk.getIcon( ForgeDirection.SOUTH.ordinal(), meta | ( formed ? 8 : 0 ) );
|
||||
|
||||
IIcon 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 = craftingBlock.getIcon( 0, meta | ( formed ? 8 : 0 ) );
|
||||
}
|
||||
@@ -83,7 +83,7 @@ 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;
|
||||
BusRenderer.INSTANCE.renderer.isFacade = true;
|
||||
|
||||
renderer.blockAccess = w;
|
||||
@@ -94,19 +94,19 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
{
|
||||
ct.lightCache = i.useSimplifiedRendering( x, y, z, null, ct.lightCache );
|
||||
}
|
||||
catch( Throwable ignored )
|
||||
catch( final Throwable ignored )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
float highX = this.isConnected( w, x, y, z, ForgeDirection.EAST ) ? 16 : 13.01f;
|
||||
float lowX = this.isConnected( w, x, y, z, ForgeDirection.WEST ) ? 0 : 2.99f;
|
||||
final float highX = this.isConnected( w, x, y, z, ForgeDirection.EAST ) ? 16 : 13.01f;
|
||||
final float lowX = this.isConnected( w, x, y, z, ForgeDirection.WEST ) ? 0 : 2.99f;
|
||||
|
||||
float highY = this.isConnected( w, x, y, z, ForgeDirection.UP ) ? 16 : 13.01f;
|
||||
float lowY = this.isConnected( w, x, y, z, ForgeDirection.DOWN ) ? 0 : 2.99f;
|
||||
final float highY = this.isConnected( w, x, y, z, ForgeDirection.UP ) ? 16 : 13.01f;
|
||||
final float lowY = this.isConnected( w, x, y, z, ForgeDirection.DOWN ) ? 0 : 2.99f;
|
||||
|
||||
float highZ = this.isConnected( w, x, y, z, ForgeDirection.SOUTH ) ? 16 : 13.01f;
|
||||
float lowZ = this.isConnected( w, x, y, z, ForgeDirection.NORTH ) ? 0 : 2.99f;
|
||||
final float highZ = this.isConnected( w, x, y, z, ForgeDirection.SOUTH ) ? 16 : 13.01f;
|
||||
final float lowZ = this.isConnected( w, x, y, z, ForgeDirection.NORTH ) ? 0 : 2.99f;
|
||||
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
@@ -117,7 +117,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
|
||||
for( ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
i.setBounds( this.fso( side, lowX, ForgeDirection.WEST ), this.fso( side, lowY, ForgeDirection.DOWN ), this.fso( side, lowZ, ForgeDirection.NORTH ), this.fso( side, highX, ForgeDirection.EAST ), this.fso( side, highY, ForgeDirection.UP ), this.fso( side, highZ, ForgeDirection.SOUTH ) );
|
||||
i.prepareBounds( renderer );
|
||||
@@ -139,15 +139,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, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isConnected( IBlockAccess w, int x, int y, int z, ForgeDirection side )
|
||||
private boolean isConnected( final IBlockAccess w, final int x, final int y, final int z, final ForgeDirection side )
|
||||
{
|
||||
final int tileYPos = y + side.offsetY;
|
||||
if( 0 <= tileYPos && tileYPos <= 255 )
|
||||
@@ -162,7 +162,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
}
|
||||
}
|
||||
|
||||
private void renderCorner( BusRenderHelper i, RenderBlocks renderer, IBlockAccess w, int x, int y, int z, ForgeDirection up, ForgeDirection east, ForgeDirection south )
|
||||
private void renderCorner( final BusRenderHelper i, final RenderBlocks renderer, final IBlockAccess w, final int x, final int y, final int z, final ForgeDirection up, final ForgeDirection east, final ForgeDirection south )
|
||||
{
|
||||
if( this.isConnected( w, x, y, z, up ) )
|
||||
{
|
||||
@@ -183,7 +183,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
i.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
|
||||
private float fso( ForgeDirection side, float def, ForgeDirection target )
|
||||
private float fso( final ForgeDirection side, final float def, final ForgeDirection target )
|
||||
{
|
||||
if( side == target )
|
||||
{
|
||||
@@ -196,7 +196,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
return def;
|
||||
}
|
||||
|
||||
private void handleSide( B blk, int meta, int x, int y, int z, BusRenderHelper i, RenderBlocks renderer, IIcon color, boolean emitsLight, boolean isMonitor, ForgeDirection side, IBlockAccess w )
|
||||
private void handleSide( final B blk, final int meta, final int x, final int y, final int z, final BusRenderHelper i, final RenderBlocks renderer, final IIcon color, final boolean emitsLight, final boolean isMonitor, final ForgeDirection side, final IBlockAccess w )
|
||||
{
|
||||
if( this.isConnected( w, x, y, z, side ) )
|
||||
{
|
||||
@@ -231,10 +231,10 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
{
|
||||
if( color == ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon() )
|
||||
{
|
||||
int b = w.getLightBrightnessForSkyBlocks( x + side.offsetX, y + side.offsetY, z + side.offsetZ, 0 );
|
||||
final int b = w.getLightBrightnessForSkyBlocks( x + side.offsetX, y + side.offsetY, z + side.offsetZ, 0 );
|
||||
|
||||
TileCraftingMonitorTile sr = blk.getTileEntity( w, x, y, z );
|
||||
AEColor col = sr.getColor();
|
||||
final TileCraftingMonitorTile sr = blk.getTileEntity( w, x, y, z );
|
||||
final AEColor col = sr.getColor();
|
||||
|
||||
Tessellator.instance.setBrightness( b );
|
||||
Tessellator.instance.setColorOpaque_I( col.whiteVariant );
|
||||
@@ -255,8 +255,8 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
{
|
||||
if( isMonitor )
|
||||
{
|
||||
TileCraftingMonitorTile sr = blk.getTileEntity( w, x, y, z );
|
||||
AEColor col = sr.getColor();
|
||||
final TileCraftingMonitorTile sr = blk.getTileEntity( w, x, y, z );
|
||||
final AEColor col = sr.getColor();
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( col.whiteVariant );
|
||||
Tessellator.instance.setBrightness( 13 << 20 | 13 << 4 );
|
||||
@@ -280,7 +280,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
}
|
||||
}
|
||||
|
||||
for( ForgeDirection a : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection a : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( a == side || a == side.getOpposite() )
|
||||
{
|
||||
@@ -302,7 +302,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
|
||||
if( !( i.getBound( a ) < 0.001 || i.getBound( a ) > 15.999 ) )
|
||||
{
|
||||
double width = 3.0 / 16.0;
|
||||
final double width = 3.0 / 16.0;
|
||||
switch( a )
|
||||
{
|
||||
case DOWN:
|
||||
@@ -352,7 +352,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
}
|
||||
}
|
||||
|
||||
private float gso( ForgeDirection side, float def, ForgeDirection target )
|
||||
private float gso( final ForgeDirection side, final float def, final ForgeDirection target )
|
||||
{
|
||||
if( side != target )
|
||||
{
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockCraftingMonitor block, TileCraftingMonitorTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderTile( final BlockCraftingMonitor block, final TileCraftingMonitorTile tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
if( tile != null )
|
||||
{
|
||||
@@ -91,9 +91,9 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
||||
}
|
||||
}
|
||||
|
||||
private void tesrRenderScreen( Tessellator tess, TileCraftingMonitorTile cmt, IAEItemStack ais )
|
||||
private void tesrRenderScreen( final Tessellator tess, final TileCraftingMonitorTile cmt, final IAEItemStack ais )
|
||||
{
|
||||
ForgeDirection side = cmt.getForward();
|
||||
final ForgeDirection side = cmt.getForward();
|
||||
|
||||
ForgeDirection walrus = side.offsetY != 0 ? ForgeDirection.SOUTH : ForgeDirection.UP;
|
||||
int spin = 0;
|
||||
@@ -110,7 +110,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU<BlockC
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
GL11.glTranslated( side.offsetX * 0.69, side.offsetY * 0.69, side.offsetZ * 0.69 );
|
||||
|
||||
float scale = 0.7f;
|
||||
final float scale = 0.7f;
|
||||
GL11.glScalef( scale, scale, scale );
|
||||
|
||||
if( side == ForgeDirection.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.getWorldObj() );
|
||||
}
|
||||
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().fontRenderer;
|
||||
int width = fr.getStringWidth( renderedStackSize );
|
||||
final FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||
final int width = fr.getStringWidth( renderedStackSize );
|
||||
GL11.glTranslatef( -0.5f * width, 0.0f, -1.0f );
|
||||
fr.drawString( renderedStackSize, 0, 0, 0 );
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockCrank blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockCrank blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
@@ -59,13 +59,13 @@ public class RenderBlockCrank extends BaseBlockRender<BlockCrank, TileCrank>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockCrank imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockCrank imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockCrank blk, TileCrank tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderBlocks )
|
||||
public void renderTile( final BlockCrank blk, final TileCrank tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderBlocks )
|
||||
{
|
||||
if( tile.getUp() == null || tile.getUp() == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
|
||||
@@ -39,11 +39,11 @@ public class RenderBlockEnergyCube extends BaseBlockRender<BlockEnergyCell, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockEnergyCell blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockEnergyCell blk, final ItemStack is, final RenderBlocks 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,12 +62,12 @@ public class RenderBlockEnergyCube extends BaseBlockRender<BlockEnergyCell, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockEnergyCell blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockEnergyCell blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
int meta = world.getBlockMetadata( x, y, z );
|
||||
final int meta = world.getBlockMetadata( x, y, z );
|
||||
|
||||
renderer.overrideBlockTexture = blk.getIcon( 0, meta );
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
final boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
renderer.overrideBlockTexture = null;
|
||||
|
||||
return out;
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockInscriber blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockInscriber blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
@@ -104,7 +104,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockInscriber block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockInscriber block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
@@ -147,7 +147,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockInscriber block, TileInscriber tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderTile( final BlockInscriber block, final TileInscriber tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
@@ -261,7 +261,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
}
|
||||
}
|
||||
|
||||
public void renderItem( ItemStack sis, float o, AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderItem( ItemStack sis, final float o, final AEBaseBlock block, final AEBaseTile tile, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
if( sis != null )
|
||||
{
|
||||
@@ -301,7 +301,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
||||
|
||||
this.doRenderItem( sis, tile );
|
||||
}
|
||||
catch( Exception err )
|
||||
catch( final Exception err )
|
||||
{
|
||||
AELog.error( err );
|
||||
}
|
||||
|
||||
@@ -40,18 +40,18 @@ public class RenderBlockInterface extends BaseBlockRender<BlockInterface, TileIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockInterface block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockInterface block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileInterface ti = block.getTileEntity( world, x, y, z );
|
||||
BlockRenderInfo info = block.getRendererInstance();
|
||||
final TileInterface ti = block.getTileEntity( world, x, y, z );
|
||||
final BlockRenderInfo info = block.getRendererInstance();
|
||||
|
||||
if( ti != null && ti.getForward() != ForgeDirection.UNKNOWN )
|
||||
{
|
||||
IIcon side = ExtraBlockTextures.BlockInterfaceAlternateArrow.getIcon();
|
||||
final IIcon side = ExtraBlockTextures.BlockInterfaceAlternateArrow.getIcon();
|
||||
info.setTemporaryRenderIcons( ExtraBlockTextures.BlockInterfaceAlternate.getIcon(), block.getIcon( 0, 0 ), side, side, side, side );
|
||||
}
|
||||
|
||||
boolean fz = super.renderInWorld( block, world, x, y, z, renderer );
|
||||
final boolean fz = super.renderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
info.setTemporaryRenderIcon( null );
|
||||
|
||||
|
||||
@@ -45,29 +45,29 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockPaint block, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockPaint block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockPaint imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockPaint imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TilePaint tp = imb.getTileEntity( world, x, y, z );
|
||||
final TilePaint tp = imb.getTileEntity( world, x, y, z );
|
||||
boolean out = false;
|
||||
if( tp != null )
|
||||
{
|
||||
// super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
IIcon[] icoSet = { imb.getIcon( 0, 0 ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
final IIcon[] icoSet = { imb.getIcon( 0, 0 ), ExtraBlockTextures.BlockPaint2.getIcon(), ExtraBlockTextures.BlockPaint3.getIcon() };
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
int brightness = imb.getMixedBrightnessForBlock( world, x, y, z );
|
||||
final int brightness = imb.getMixedBrightnessForBlock( world, x, y, z );
|
||||
|
||||
EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
|
||||
final EnumSet<ForgeDirection> validSides = EnumSet.noneOf( ForgeDirection.class );
|
||||
|
||||
for( ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
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,7 +124,7 @@ public class RenderBlockPaint extends BaseBlockRender<BlockPaint, TilePaint>
|
||||
pos_y += z;
|
||||
}
|
||||
|
||||
IIcon ico = icoSet[s.getSeed() % icoSet.length];
|
||||
final IIcon ico = icoSet[s.getSeed() % icoSet.length];
|
||||
|
||||
switch( s.side )
|
||||
{
|
||||
|
||||
@@ -39,20 +39,20 @@ public class RenderBlockQuartzAccelerator extends BaseBlockRender<BlockQuartzGro
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockQuartzGrowthAccelerator blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockQuartzGrowthAccelerator blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileEntity te = world.getTileEntity( x, y, z );
|
||||
final TileEntity te = world.getTileEntity( x, y, z );
|
||||
if( te instanceof TileQuartzGrowthAccelerator )
|
||||
{
|
||||
if( ( (TileQuartzGrowthAccelerator) te ).hasPower )
|
||||
{
|
||||
IIcon top_Bottom = ExtraBlockTextures.BlockQuartzGrowthAcceleratorOn.getIcon();
|
||||
IIcon side = ExtraBlockTextures.BlockQuartzGrowthAcceleratorSideOn.getIcon();
|
||||
final IIcon top_Bottom = ExtraBlockTextures.BlockQuartzGrowthAcceleratorOn.getIcon();
|
||||
final IIcon side = ExtraBlockTextures.BlockQuartzGrowthAcceleratorSideOn.getIcon();
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( top_Bottom, top_Bottom, side, side, side, side );
|
||||
}
|
||||
}
|
||||
|
||||
boolean out = super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
final boolean out = super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
return out;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockSkyChest blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockSkyChest blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
@@ -74,13 +74,13 @@ public class RenderBlockSkyChest extends BaseBlockRender<BlockSkyChest, TileSkyC
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockSkyChest blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockSkyChest blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockSkyChest block, TileSkyChest skyChest, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
|
||||
public void renderTile( final BlockSkyChest block, final TileSkyChest skyChest, final Tessellator tess, final double x, final double y, final double z, final float partialTick, final RenderBlocks renderer )
|
||||
{
|
||||
if( skyChest == null )
|
||||
{
|
||||
|
||||
@@ -53,13 +53,13 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockSkyCompass blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockSkyCompass blk, final ItemStack is, final RenderBlocks renderer, ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
if( type == ItemRenderType.INVENTORY )
|
||||
{
|
||||
boolean isGood = false;
|
||||
|
||||
IInventory inv = Minecraft.getMinecraft().thePlayer.inventory;
|
||||
final IInventory inv = Minecraft.getMinecraft().thePlayer.inventory;
|
||||
for( int x = 0; x < inv.getSizeInventory(); x++ )
|
||||
{
|
||||
if( inv.getStackInSlot( x ) == is )
|
||||
@@ -77,7 +77,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
||||
final ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||
|
||||
@@ -120,10 +120,10 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
rYaw = p.renderYawOffset;
|
||||
}
|
||||
|
||||
int x = (int) p.posX;
|
||||
int y = (int) p.posY;
|
||||
int z = (int) p.posZ;
|
||||
CompassResult cr = CompassManager.INSTANCE.getCompassDirection( 0, x, y, z );
|
||||
final int x = (int) p.posX;
|
||||
final int y = (int) p.posY;
|
||||
final int z = (int) p.posZ;
|
||||
final CompassResult cr = CompassManager.INSTANCE.getCompassDirection( 0, x, y, z );
|
||||
|
||||
for( int i = 0; i < 3; i++ )
|
||||
{
|
||||
@@ -144,14 +144,14 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
{
|
||||
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
||||
{
|
||||
float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
float adjustment = (float) Math.PI * 0.74f;
|
||||
final float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
final float adjustment = (float) Math.PI * 0.74f;
|
||||
this.model.renderAll( (float) this.flipidiy( cr.rad + offRads + adjustment ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
float adjustment = (float) Math.PI * -0.74f;
|
||||
final float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
final float adjustment = (float) Math.PI * -0.74f;
|
||||
this.model.renderAll( (float) this.flipidiy( cr.rad + offRads + adjustment ) );
|
||||
}
|
||||
}
|
||||
@@ -173,13 +173,13 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockSkyCompass blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockSkyCompass blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockSkyCompass block, TileSkyCompass skyCompass, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
|
||||
public void renderTile( final BlockSkyCompass block, final TileSkyCompass skyCompass, final Tessellator tess, final double x, final double y, final double z, final float partialTick, final RenderBlocks renderer )
|
||||
{
|
||||
if( skyCompass == null )
|
||||
{
|
||||
@@ -239,10 +239,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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockWireless blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockWireless blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
this.blk = blk;
|
||||
this.centerX = 0;
|
||||
@@ -64,8 +64,8 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
this.centerZ = 0;
|
||||
this.hasChan = false;
|
||||
this.hasPower = false;
|
||||
BlockRenderInfo ri = blk.getRendererInstance();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final BlockRenderInfo ri = blk.getRendererInstance();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
@@ -87,18 +87,18 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
|
||||
ForgeDirection[] sides = { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
final ForgeDirection[] sides = { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
|
||||
int s = 1;
|
||||
|
||||
for( ForgeDirection side : sides )
|
||||
for( final ForgeDirection side : sides )
|
||||
{
|
||||
this.renderBlockBounds( renderer, 8 + ( side.offsetX != 0 ? side.offsetX * 2 : -2 ), 8 + ( side.offsetY != 0 ? side.offsetY * 2 : -2 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 2 : -1 ) + s, 8 + ( side.offsetX != 0 ? side.offsetX * 4 : 2 ), 8 + ( side.offsetY != 0 ? side.offsetY * 4 : 2 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 5 : 1 ) + s, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
}
|
||||
|
||||
s = 3;
|
||||
for( ForgeDirection side : sides )
|
||||
for( final ForgeDirection side : sides )
|
||||
{
|
||||
this.renderBlockBounds( renderer, 8 + ( side.offsetX != 0 ? side.offsetX * 4 : -1 ), 8 + ( side.offsetY != 0 ? side.offsetY * 4 : -1 ), 1 + ( side.offsetZ != 0 ? side.offsetZ * 4 : -1 ) + s, 8 + ( side.offsetX != 0 ? side.offsetX * 5 : 1 ), 8 + ( side.offsetY != 0 ? side.offsetY * 5 : 1 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 5 : 1 ) + s, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
|
||||
@@ -107,20 +107,20 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockWireless blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockWireless blk, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileWireless tw = blk.getTileEntity( world, x, y, z );
|
||||
final TileWireless tw = blk.getTileEntity( world, x, y, z );
|
||||
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();
|
||||
|
||||
ForgeDirection fdy = tw.getUp();
|
||||
ForgeDirection fdz = tw.getForward();
|
||||
ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
|
||||
final ForgeDirection fdy = tw.getUp();
|
||||
final ForgeDirection fdz = tw.getForward();
|
||||
final ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
@@ -144,18 +144,18 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
|
||||
ForgeDirection[] sides = { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
final ForgeDirection[] sides = new ForgeDirection[] { ForgeDirection.EAST, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.DOWN };
|
||||
|
||||
int s = 1;
|
||||
|
||||
for( ForgeDirection side : sides )
|
||||
for( final ForgeDirection side : sides )
|
||||
{
|
||||
this.renderBlockBounds( renderer, 8 + ( side.offsetX != 0 ? side.offsetX * 2 : -2 ), 8 + ( side.offsetY != 0 ? side.offsetY * 2 : -2 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 2 : -1 ) + s, 8 + ( side.offsetX != 0 ? side.offsetX * 4 : 2 ), 8 + ( side.offsetY != 0 ? side.offsetY * 4 : 2 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 5 : 1 ) + s, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
}
|
||||
|
||||
s = 3;
|
||||
for( ForgeDirection side : sides )
|
||||
for( final ForgeDirection side : sides )
|
||||
{
|
||||
this.renderBlockBounds( renderer, 8 + ( side.offsetX != 0 ? side.offsetX * 4 : -1 ), 8 + ( side.offsetY != 0 ? side.offsetY * 4 : -1 ), 1 + ( side.offsetZ != 0 ? side.offsetZ * 4 : -1 ) + s, 8 + ( side.offsetX != 0 ? side.offsetX * 5 : 1 ), 8 + ( side.offsetY != 0 ? side.offsetY * 5 : 1 ), 2 + ( side.offsetZ != 0 ? side.offsetZ * 5 : 1 ) + s, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
@@ -168,13 +168,13 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
|
||||
if( this.hasChan )
|
||||
{
|
||||
int l = 14;
|
||||
final int l = 14;
|
||||
Tessellator.instance.setBrightness( l << 20 | l << 4 );
|
||||
Tessellator.instance.setColorOpaque_I( AEColor.Transparent.blackVariant );
|
||||
}
|
||||
else if( this.hasPower )
|
||||
{
|
||||
int l = 9;
|
||||
final int l = 9;
|
||||
Tessellator.instance.setBrightness( l << 20 | l << 4 );
|
||||
Tessellator.instance.setColorOpaque_I( AEColor.Transparent.whiteVariant );
|
||||
}
|
||||
@@ -216,10 +216,10 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
return true;
|
||||
}
|
||||
|
||||
private void renderTorchAtAngle( RenderBlocks renderer, ForgeDirection x, ForgeDirection y, ForgeDirection z )
|
||||
private void renderTorchAtAngle( final RenderBlocks renderer, final ForgeDirection x, final ForgeDirection y, final ForgeDirection z )
|
||||
{
|
||||
IIcon r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : this.blk.getIcon( 0, 0 ) );
|
||||
IIcon sides = new OffsetIcon( r, 0.0f, -2.0f );
|
||||
final IIcon r = ( this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : this.blk.getIcon( 0, 0 ) );
|
||||
final IIcon 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, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockDrive block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.SOUTH ), block, is, Tessellator.instance, 0x000000, renderer );
|
||||
@@ -55,27 +55,27 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockDrive imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockDrive imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileDrive sp = imb.getTileEntity( world, x, y, z );
|
||||
final TileDrive sp = imb.getTileEntity( world, x, y, z );
|
||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
ForgeDirection up = sp.getUp();
|
||||
ForgeDirection forward = sp.getForward();
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
final ForgeDirection up = sp.getUp();
|
||||
final ForgeDirection forward = sp.getForward();
|
||||
final ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
boolean result = super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final boolean result = super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
IIcon ico = ExtraBlockTextures.MEStorageCellTextures.getIcon();
|
||||
final IIcon ico = ExtraBlockTextures.MEStorageCellTextures.getIcon();
|
||||
|
||||
int b = world.getLightBrightnessForSkyBlocks( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ, 0 );
|
||||
final int b = world.getLightBrightnessForSkyBlocks( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ, 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;
|
||||
@@ -263,7 +263,7 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive>
|
||||
|
||||
if( stat != 0 )
|
||||
{
|
||||
IIcon whiteIcon = ExtraBlockTextures.White.getIcon();
|
||||
final IIcon 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, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockChest block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
Tessellator.instance.setBrightness( 0 );
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
|
||||
@@ -64,9 +64,9 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockChest imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockChest imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileChest sp = imb.getTileEntity( world, x, y, z );
|
||||
final TileChest sp = imb.getTileEntity( world, x, y, z );
|
||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
if( sp == null )
|
||||
@@ -74,14 +74,14 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
|
||||
return false;
|
||||
}
|
||||
|
||||
ForgeDirection up = sp.getUp();
|
||||
ForgeDirection forward = sp.getForward();
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
final ForgeDirection up = sp.getUp();
|
||||
final ForgeDirection forward = sp.getForward();
|
||||
final ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
this.preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
int stat = sp.getCellStatus( 0 );
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
final int stat = sp.getCellStatus( 0 );
|
||||
final boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
this.selectFace( renderer, west, up, forward, 5, 16 - 5, 9, 12 );
|
||||
|
||||
@@ -95,8 +95,8 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
|
||||
Tessellator.instance.setBrightness( b );
|
||||
Tessellator.instance.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 == ForgeDirection.EAST && ( up == ForgeDirection.NORTH || up == ForgeDirection.SOUTH ) )
|
||||
{
|
||||
flippableIcon.setFlip( true, false );
|
||||
@@ -162,7 +162,7 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest>
|
||||
Tessellator.instance.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() );
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().whiteVariant );
|
||||
IIcon 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, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final AEBaseBlock block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final AEBaseBlock block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -47,19 +47,19 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
{
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockQuantumBase block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockQuantumBase block, final ItemStack item, final RenderBlocks 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, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockQuantumBase block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileQuantumBridge tqb = block.getTileEntity( world, x, y, z );
|
||||
final TileQuantumBridge tqb = block.getTileEntity( world, x, y, z );
|
||||
if( tqb == null )
|
||||
{
|
||||
return false;
|
||||
@@ -71,23 +71,23 @@ 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<ForgeDirection> sides = tqb.getConnections();
|
||||
final EnumSet<ForgeDirection> sides = tqb.getConnections();
|
||||
|
||||
Item transGlassCable = parts.cableGlass().item( AEColor.Transparent );
|
||||
final Item transGlassCable = parts.cableGlass().item( AEColor.Transparent );
|
||||
this.renderCableAt( 0.11D, world, x, y, z, block, renderer, transGlassCable.getIconIndex( 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, x, y, z, block, renderer, transCoveredCable.getIconIndex( 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, x, y, z );
|
||||
}
|
||||
@@ -95,14 +95,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, x, y, z );
|
||||
}
|
||||
else if( tqb.isCorner() )
|
||||
{
|
||||
Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
|
||||
final Item transCoveredCable = parts.cableCovered().item( AEColor.Transparent );
|
||||
this.renderCableAt( 0.188D, world, x, y, z, block, renderer, transCoveredCable.getIconIndex( parts.cableCovered().stack( AEColor.Transparent, 1 ) ), 0.05D, tqb.getConnections() );
|
||||
|
||||
float renderMin = 4.0f / 16.0f;
|
||||
@@ -119,9 +119,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
int bn = 15;
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
for( ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
this.renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingCornerLight.getIcon(), renderer, side );
|
||||
}
|
||||
@@ -147,9 +147,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
renderer.setRenderBounds( renderMin, renderMin, renderMin, renderMax, renderMax, renderMax );
|
||||
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
int bn = 15;
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
for( ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
this.renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingEdgeLight.getIcon(), renderer, side );
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
return true;
|
||||
}
|
||||
|
||||
private void renderCableAt( double thickness, IBlockAccess world, int x, int y, int z, BlockQuantumBase block, RenderBlocks renderer, IIcon texture, double pull, Collection<ForgeDirection> connections )
|
||||
private void renderCableAt( final double thickness, final IBlockAccess world, final int x, final int y, final int z, final BlockQuantumBase block, final RenderBlocks renderer, final IIcon texture, final double pull, final Collection<ForgeDirection> connections )
|
||||
{
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture );
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class RenderQuartzGlass extends BaseBlockRender<BlockQuartzGlass, 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<BlockQuartzGlass, AEBaseT
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockQuartzGlass block, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockQuartzGlass block, final ItemStack is, final RenderBlocks 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<BlockQuartzGlass, AEBaseT
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockQuartzGlass imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockQuartzGlass imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
int cx = Math.abs( x % 10 );
|
||||
int cy = Math.abs( y % 10 );
|
||||
int cz = Math.abs( z % 10 );
|
||||
final int cx = Math.abs( x % 10 );
|
||||
final int cy = Math.abs( y % 10 );
|
||||
final int cz = Math.abs( z % 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] + ( x + y + z ) ) % 4 ) )
|
||||
{
|
||||
@@ -94,7 +94,7 @@ public class RenderQuartzGlass extends BaseBlockRender<BlockQuartzGlass, AEBaseT
|
||||
break;
|
||||
}
|
||||
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
final boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.EAST );
|
||||
@@ -130,7 +130,7 @@ public class RenderQuartzGlass extends BaseBlockRender<BlockQuartzGlass, AEBaseT
|
||||
return result;
|
||||
}
|
||||
|
||||
private void renderEdge( BlockQuartzGlass imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer, ForgeDirection side, ForgeDirection direction )
|
||||
private void renderEdge( final BlockQuartzGlass imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer, final ForgeDirection side, final ForgeDirection direction )
|
||||
{
|
||||
if( !this.isFlush( imb, world, x + side.offsetX, y + side.offsetY, z + side.offsetZ ) )
|
||||
{
|
||||
@@ -214,22 +214,22 @@ public class RenderQuartzGlass extends BaseBlockRender<BlockQuartzGlass, AEBaseT
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isFlush( BlockQuartzGlass imb, IBlockAccess world, int x, int y, int z )
|
||||
private boolean isFlush( final BlockQuartzGlass imb, final IBlockAccess world, final int x, final int y, final int z )
|
||||
{
|
||||
return this.isGlass( imb, world, x, y, z );
|
||||
}
|
||||
|
||||
private boolean isGlass( BlockQuartzGlass imb, IBlockAccess world, int x, int y, int z )
|
||||
private boolean isGlass( final BlockQuartzGlass imb, final IBlockAccess world, final int x, final int y, final int z )
|
||||
{
|
||||
return this.isQuartzGlass( world, x, y, z ) || this.isVibrantQuartzGlass( world, x, y, z );
|
||||
}
|
||||
|
||||
private boolean isQuartzGlass( IBlockAccess world, int x, int y, int z )
|
||||
private boolean isQuartzGlass( final IBlockAccess world, final int x, final int y, final int z )
|
||||
{
|
||||
return AEApi.instance().definitions().blocks().quartzGlass().isSameAs( world, x, y, z );
|
||||
}
|
||||
|
||||
private boolean isVibrantQuartzGlass( IBlockAccess world, int x, int y, int z )
|
||||
private boolean isVibrantQuartzGlass( final IBlockAccess world, final int x, final int y, final int z )
|
||||
{
|
||||
return AEApi.instance().definitions().blocks().quartzVibrantGlass().isSameAs( world, x, y, z );
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class RenderQuartzOre extends BaseBlockRender<OreQuartz, AEBaseTile>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( OreQuartz blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final OreQuartz blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
super.renderInventory( blk, is, renderer, type, obj );
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.OreQuartzStone.getIcon() );
|
||||
@@ -48,7 +48,7 @@ public class RenderQuartzOre extends BaseBlockRender<OreQuartz, AEBaseTile>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( OreQuartz quartz, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final OreQuartz quartz, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
quartz.setEnhanceBrightness( true );
|
||||
super.renderInWorld( quartz, world, x, y, z, renderer );
|
||||
|
||||
@@ -45,24 +45,24 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final AEBaseBlock blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
Tessellator tess = Tessellator.instance;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
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( ForgeDirection.class ), blk, is, tess, 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( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
@@ -73,10 +73,10 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 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( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
@@ -95,9 +95,9 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final AEBaseBlock block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z );
|
||||
final IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z );
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
float zOff = 0.0f;
|
||||
@@ -105,21 +105,21 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
float xOff = 0.0f;
|
||||
if( te != null )
|
||||
{
|
||||
ForgeDirection forward = te.getUp();
|
||||
final ForgeDirection forward = te.getUp();
|
||||
xOff = forward.offsetX * -( 4.0f / 16.0f );
|
||||
yOff = forward.offsetY * -( 4.0f / 16.0f );
|
||||
zOff = forward.offsetZ * -( 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, x, y, z, renderer );
|
||||
|
||||
int r = ( x + y + z ) % 2;
|
||||
float singlePixel = 1.0f / 16.0f;
|
||||
final int r = ( x + y + z ) % 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 );
|
||||
@@ -139,12 +139,12 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 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, x, y, z );
|
||||
final boolean out = renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
@@ -157,7 +157,7 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
||||
|
||||
if( te != null )
|
||||
{
|
||||
ForgeDirection forward = te.getUp();
|
||||
final ForgeDirection forward = 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, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockSpatialPylon block, final ItemStack is, final RenderBlocks 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, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockSpatialPylon imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
TileSpatialPylon sp = imb.getTileEntity( world, x, y, z );
|
||||
final TileSpatialPylon sp = imb.getTileEntity( world, x, y, z );
|
||||
|
||||
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, ForgeDirection.UP ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.DOWN ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.SOUTH ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.NORTH ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.EAST ), this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.WEST ) );
|
||||
|
||||
boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
||||
final boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
if( ( displayBits & TileSpatialPylon.DISPLAY_POWERED_ENABLED ) == TileSpatialPylon.DISPLAY_POWERED_ENABLED )
|
||||
{
|
||||
int bn = 15;
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||
|
||||
for( ForgeDirection d : ForgeDirection.VALID_DIRECTIONS )
|
||||
for( final ForgeDirection d : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
this.renderFace( x, y, z, imb, this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, d ), renderer, d );
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||
return result;
|
||||
}
|
||||
|
||||
private IIcon getBlockTextureFromSideOutside( BlockSpatialPylon blk, TileSpatialPylon sp, int displayBits, ForgeDirection ori, ForgeDirection dir )
|
||||
private IIcon getBlockTextureFromSideOutside( final BlockSpatialPylon blk, final TileSpatialPylon sp, final int displayBits, final ForgeDirection ori, final ForgeDirection dir )
|
||||
{
|
||||
|
||||
if( ori == dir || ori.getOpposite() == dir )
|
||||
@@ -188,9 +188,9 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||
return blk.getIcon( 0, 0 );
|
||||
}
|
||||
|
||||
private IIcon getBlockTextureFromSideInside( BlockSpatialPylon blk, TileSpatialPylon sp, int displayBits, ForgeDirection ori, ForgeDirection dir )
|
||||
private IIcon getBlockTextureFromSideInside( final BlockSpatialPylon blk, final TileSpatialPylon sp, final int displayBits, final ForgeDirection ori, final ForgeDirection dir )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
|
||||
@@ -38,18 +38,18 @@ public class RenderTinyTNT extends BaseBlockRender<BlockTinyTNT, AEBaseTile>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockTinyTNT block, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockTinyTNT block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
super.renderInventory( block, is, renderer, type, obj );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockTinyTNT imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockTinyTNT imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
renderer.renderAllFaces = true;
|
||||
renderer.setRenderBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||
boolean out = super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
final boolean out = super.renderInWorld( imb, world, x, y, z, renderer );
|
||||
renderer.renderAllFaces = false;
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -42,15 +42,15 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockCableBus blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockCableBus blk, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
// nothing.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockCableBus block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockCableBus block, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
AEBaseTile t = block.getTileEntity( world, x, y, z );
|
||||
final AEBaseTile t = block.getTileEntity( world, x, y, z );
|
||||
|
||||
if( t instanceof TileCableBus )
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class RendererCableBus extends BaseBlockRender<BlockCableBus, TileCableBu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTile( BlockCableBus block, TileCableBus cableBus, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
|
||||
public void renderTile( final BlockCableBus block, final TileCableBus cableBus, final Tessellator tess, final double x, final double y, final double z, final float f, final RenderBlocks renderer )
|
||||
{
|
||||
if( cableBus != null )
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventory( BlockSecurity block, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj )
|
||||
public void renderInventory( final BlockSecurity block, final ItemStack is, final RenderBlocks renderer, final ItemRenderType type, final Object[] obj )
|
||||
{
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.SOUTH ), block, is, Tessellator.instance, 0x000000, renderer );
|
||||
@@ -58,16 +58,16 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderInWorld( BlockSecurity imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||
public boolean renderInWorld( final BlockSecurity imb, final IBlockAccess world, final int x, final int y, final int z, final RenderBlocks renderer )
|
||||
{
|
||||
TileSecurity sp = imb.getTileEntity( world, x, y, z );
|
||||
final TileSecurity sp = imb.getTileEntity( world, x, y, z );
|
||||
renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );
|
||||
|
||||
ForgeDirection up = sp.getUp();
|
||||
final ForgeDirection up = sp.getUp();
|
||||
|
||||
this.preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
final boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
int b = world.getLightBrightnessForSkyBlocks( x + up.offsetX, y + up.offsetY, z + up.offsetZ, 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( Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
public void renderParticle( final Tessellator tess, 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 );
|
||||
|
||||
@@ -43,7 +43,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;
|
||||
@@ -69,26 +69,26 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( Tessellator par1Tessellator, float partialTick, float x, float y, float z, float rx, float rz )
|
||||
public void renderParticle( final Tessellator par1Tessellator, 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;
|
||||
@@ -96,7 +96,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 );
|
||||
@@ -105,7 +105,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
}
|
||||
}
|
||||
|
||||
public void fromItem( ForgeDirection d )
|
||||
public void fromItem( final ForgeDirection d )
|
||||
{
|
||||
this.posX += 0.2 * d.offsetX;
|
||||
this.posY += 0.2 * d.offsetY;
|
||||
|
||||
@@ -43,7 +43,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;
|
||||
@@ -68,25 +68,25 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7 )
|
||||
public void renderParticle( final Tessellator par1Tessellator, 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 );
|
||||
@@ -95,7 +95,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
}
|
||||
}
|
||||
|
||||
public void fromItem( ForgeDirection d )
|
||||
public void fromItem( final ForgeDirection d )
|
||||
{
|
||||
this.posX += 0.2 * d.offsetX;
|
||||
this.posY += 0.2 * d.offsetY;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -40,13 +40,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];
|
||||
@@ -76,39 +76,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( Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY )
|
||||
public void renderParticle( final Tessellator tess, 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;
|
||||
@@ -142,13 +142,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 )
|
||||
{
|
||||
@@ -169,7 +169,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;
|
||||
@@ -201,7 +201,7 @@ public class LightningFX extends EntityFX
|
||||
this.hasData = false;
|
||||
}
|
||||
|
||||
private void draw( Tessellator tess, double[] a, double[] b, double f6, double f8 )
|
||||
private void draw( final Tessellator 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 IIcon 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( ForgeDirection d )
|
||||
public void fromItem( final ForgeDirection d )
|
||||
{
|
||||
this.particleScale *= 1.2f;
|
||||
}
|
||||
@@ -70,18 +70,18 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle( Tessellator par1Tessellator, float par2, float par3, float par4, float par5, float par6, float par7 )
|
||||
public void renderParticle( final Tessellator par1Tessellator, 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 );
|
||||
|
||||
@@ -30,10 +30,10 @@ import cpw.mods.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;
|
||||
@@ -51,7 +51,7 @@ public class VibrantFX extends EntityFX
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getBrightness( float par1 )
|
||||
public float getBrightness( final float par1 )
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -38,13 +38,13 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
boolean recursive;
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType( ItemStack item, ItemRenderType type )
|
||||
public boolean handleRenderType( final ItemStack item, final ItemRenderType type )
|
||||
{
|
||||
boolean isShiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT );
|
||||
final boolean isShiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT );
|
||||
|
||||
if( !this.recursive && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld )
|
||||
{
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
if( iep.getOutput( item ) != null )
|
||||
{
|
||||
return true;
|
||||
@@ -55,20 +55,20 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper( ItemRenderType type, ItemStack item, ItemRendererHelper helper )
|
||||
public boolean shouldUseRenderHelper( final ItemRenderType type, final ItemStack item, final ItemRendererHelper helper )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
|
||||
public void renderItem( final ItemRenderType type, final ItemStack item, final Object... data )
|
||||
{
|
||||
this.recursive = true;
|
||||
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
final ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
|
||||
ItemStack is = iep.getOutput( item );
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
final ItemStack is = iep.getOutput( item );
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -38,28 +38,28 @@ public class ToolBiometricCardRender 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();
|
||||
final IIcon par2Icon = item.getIconIndex();
|
||||
|
||||
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();
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ToolBiometricCardRender implements IItemRenderer
|
||||
else
|
||||
{
|
||||
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 );
|
||||
@@ -92,19 +92,19 @@ public class ToolBiometricCardRender implements IItemRenderer
|
||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||
}
|
||||
|
||||
float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
|
||||
float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
|
||||
final float u = ExtraItemTextures.White.getIcon().getInterpolatedU( 8.1 );
|
||||
final float v = ExtraItemTextures.White.getIcon().getInterpolatedV( 8.1 );
|
||||
|
||||
String username = "";
|
||||
if( item.getItem() instanceof IBiometricCard )
|
||||
{
|
||||
GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
|
||||
final GameProfile gp = ( (IBiometricCard) item.getItem() ).getProfile( item );
|
||||
if( gp != null )
|
||||
{
|
||||
username = gp.getName();
|
||||
}
|
||||
}
|
||||
int hash = username.length() > 0 ? username.hashCode() : 0;
|
||||
final int hash = username.length() > 0 ? username.hashCode() : 0;
|
||||
|
||||
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
||||
GL11.glTranslatef( 4, 6, 0 );
|
||||
@@ -118,7 +118,7 @@ public class ToolBiometricCardRender implements IItemRenderer
|
||||
col = AEColor.Black;
|
||||
}
|
||||
|
||||
float z = 0;
|
||||
final float z = 0;
|
||||
for( int x = 0; x < 8; x++ )// 8
|
||||
{
|
||||
for( int y = 0; y < 6; y++ )// 6
|
||||
@@ -140,7 +140,7 @@ public class ToolBiometricCardRender implements IItemRenderer
|
||||
}
|
||||
else
|
||||
{
|
||||
float scale = 0.3f / 255.0f;
|
||||
final float scale = 0.3f / 255.0f;
|
||||
tessellator.setColorOpaque_F( ( ( col.blackVariant >> 16 ) & 0xff ) * scale, ( ( col.blackVariant >> 8 ) & 0xff ) * scale, ( col.blackVariant & 0xff ) * scale );
|
||||
}
|
||||
|
||||
|
||||
@@ -36,28 +36,28 @@ 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 )
|
||||
{
|
||||
IIcon par2Icon = item.getIconIndex();
|
||||
final IIcon par2Icon = item.getIconIndex();
|
||||
|
||||
float f4 = par2Icon.getMinU();
|
||||
float f5 = par2Icon.getMaxU();
|
||||
float f6 = par2Icon.getMinV();
|
||||
float f7 = par2Icon.getMaxV();
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
final Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
@@ -91,7 +91,7 @@ public class ToolColorApplicatorRender 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 );
|
||||
@@ -101,9 +101,9 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
||||
GL11.glRotatef( 180F, 1.0F, 0.0F, 0.0F );
|
||||
}
|
||||
|
||||
IIcon dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
|
||||
IIcon med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
|
||||
IIcon light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
|
||||
final IIcon dark = ExtraItemTextures.ToolColorApplicatorTip_Dark.getIcon();
|
||||
final IIcon med = ExtraItemTextures.ToolColorApplicatorTip_Medium.getIcon();
|
||||
final IIcon light = ExtraItemTextures.ToolColorApplicatorTip_Light.getIcon();
|
||||
|
||||
GL11.glScalef( 1F / 16F, 1F / 16F, 1F );
|
||||
if( type != ItemRenderType.INVENTORY )
|
||||
@@ -112,7 +112,7 @@ public class ToolColorApplicatorRender implements IItemRenderer
|
||||
}
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
|
||||
AEColor col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
|
||||
final AEColor col = ( (ToolColorApplicator) item.getItem() ).getActiveColor( item );
|
||||
|
||||
if( col != null )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user