final variables and parameters
seeing some methods it does actually help to enforce the parameters
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user