Changed access to use this qualifier
This commit is contained in:
@@ -100,7 +100,7 @@ public class ClientHelper extends ServerHelper
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
|
||||
return renderModeForPlayer( player );
|
||||
return this.renderModeForPlayer( player );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -314,22 +314,22 @@ public class ClientHelper extends ServerHelper
|
||||
switch (effect)
|
||||
{
|
||||
case Assembler:
|
||||
spawnAssembler( worldObj, posX, posY, posZ, o );
|
||||
this.spawnAssembler( worldObj, posX, posY, posZ, o );
|
||||
return;
|
||||
case Vibrant:
|
||||
spawnVibrant( worldObj, posX, posY, posZ );
|
||||
this.spawnVibrant( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case Crafting:
|
||||
spawnCrafting( worldObj, posX, posY, posZ );
|
||||
this.spawnCrafting( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case Energy:
|
||||
spawnEnergy( worldObj, posX, posY, posZ );
|
||||
this.spawnEnergy( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case Lightning:
|
||||
spawnLightning( worldObj, posX, posY, posZ );
|
||||
this.spawnLightning( worldObj, posX, posY, posZ );
|
||||
return;
|
||||
case LightningArc:
|
||||
spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
||||
this.spawnLightningArc( worldObj, posX, posY, posZ, (Vec3) o );
|
||||
return;
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
public AEBaseGui(Container container)
|
||||
{
|
||||
super( container );
|
||||
subGui = switchingGuis;
|
||||
this.subGui = switchingGuis;
|
||||
switchingGuis = false;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
public boolean isSubGui()
|
||||
{
|
||||
return subGui;
|
||||
return this.subGui;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,7 +125,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if ( i.next() instanceof SlotME )
|
||||
i.remove();
|
||||
|
||||
for (InternalSlotME me : meSlots)
|
||||
for (InternalSlotME me : this.meSlots)
|
||||
slots.add( new SlotME( me ) );
|
||||
}
|
||||
|
||||
@@ -145,21 +145,21 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
|
||||
int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
|
||||
mouseWheelEvent( x, y, i / Math.abs( i ) );
|
||||
this.mouseWheelEvent( x, y, i / Math.abs( i ) );
|
||||
}
|
||||
else if ( i != 0 && myScrollBar != null )
|
||||
myScrollBar.wheel( i );
|
||||
else if ( i != 0 && this.myScrollBar != null )
|
||||
this.myScrollBar.wheel( i );
|
||||
}
|
||||
|
||||
protected void mouseWheelEvent(int x, int y, int wheel)
|
||||
{
|
||||
Slot slot = getSlot( x, y );
|
||||
Slot slot = this.getSlot( x, y );
|
||||
if ( slot instanceof SlotME )
|
||||
{
|
||||
IAEItemStack item = ((SlotME) slot).getAEStack();
|
||||
if ( item != null )
|
||||
{
|
||||
((AEBaseContainer) inventorySlots).setTargetStack( item );
|
||||
((AEBaseContainer) this.inventorySlots).setTargetStack( item );
|
||||
InventoryAction direction = wheel > 0 ? InventoryAction.ROLL_DOWN : InventoryAction.ROLL_UP;
|
||||
int times = Math.abs( wheel );
|
||||
final int inventorySize = this.getInventorySlots().size();
|
||||
@@ -176,13 +176,13 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
public void onGuiClosed()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
|
||||
this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int xCoord, int yCoord, int btn)
|
||||
{
|
||||
drag_click.clear();
|
||||
this.drag_click.clear();
|
||||
|
||||
if ( btn == 1 )
|
||||
{
|
||||
@@ -217,7 +217,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
|
||||
if ( drag_click.size() > 1 )
|
||||
if ( this.drag_click.size() > 1 )
|
||||
return;
|
||||
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
@@ -259,7 +259,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if ( Keyboard.isKeyDown( Keyboard.KEY_SPACE ) )
|
||||
{
|
||||
if ( enableSpaceClicking() )
|
||||
if ( this.enableSpaceClicking() )
|
||||
{
|
||||
IAEItemStack stack = null;
|
||||
if ( slot instanceof SlotME )
|
||||
@@ -270,7 +270,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if ( !(slot instanceof SlotME) && slot != null )
|
||||
slotNum = slot.slotNumber;
|
||||
|
||||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||
((AEBaseContainer) this.inventorySlots).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
return;
|
||||
@@ -356,7 +356,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if ( action != null )
|
||||
{
|
||||
((AEBaseContainer) inventorySlots).setTargetStack( stack );
|
||||
((AEBaseContainer) this.inventorySlots).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, this.getInventorySlots().size(), 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
@@ -364,21 +364,21 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !disableShiftClick && isShiftKeyDown() )
|
||||
if ( !this.disableShiftClick && isShiftKeyDown() )
|
||||
{
|
||||
disableShiftClick = true;
|
||||
this.disableShiftClick = true;
|
||||
|
||||
if ( dbl_whichItem == null || bl_clicked != slot || dbl_clickTimer.elapsed( TimeUnit.MILLISECONDS ) > 150 )
|
||||
if ( this.dbl_whichItem == null || this.bl_clicked != slot || this.dbl_clickTimer.elapsed( TimeUnit.MILLISECONDS ) > 150 )
|
||||
{
|
||||
// some simple double click logic.
|
||||
bl_clicked = slot;
|
||||
dbl_clickTimer = Stopwatch.createStarted();
|
||||
this.bl_clicked = slot;
|
||||
this.dbl_clickTimer = Stopwatch.createStarted();
|
||||
if ( slot != null )
|
||||
dbl_whichItem = slot.getHasStack() ? slot.getStack().copy() : null;
|
||||
this.dbl_whichItem = slot.getHasStack() ? slot.getStack().copy() : null;
|
||||
else
|
||||
dbl_whichItem = null;
|
||||
this.dbl_whichItem = null;
|
||||
}
|
||||
else if ( dbl_whichItem != null )
|
||||
else if ( this.dbl_whichItem != null )
|
||||
{
|
||||
// a replica of the weird broken vanilla feature.
|
||||
|
||||
@@ -386,14 +386,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for (Slot inventorySlot : slots)
|
||||
{
|
||||
if ( inventorySlot != null && inventorySlot.canTakeStack( this.mc.thePlayer ) && inventorySlot.getHasStack()
|
||||
&& inventorySlot.inventory == slot.inventory && Container.func_94527_a( inventorySlot, dbl_whichItem, true ) )
|
||||
&& inventorySlot.inventory == slot.inventory && Container.func_94527_a( inventorySlot, this.dbl_whichItem, true ) )
|
||||
{
|
||||
this.handleMouseClick( inventorySlot, inventorySlot.slotNumber, ctrlDown, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
disableShiftClick = false;
|
||||
this.disableShiftClick = false;
|
||||
}
|
||||
|
||||
super.handleMouseClick( slot, slotIdx, ctrlDown, key );
|
||||
@@ -407,10 +407,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
if ( slot instanceof SlotFake && itemstack != null )
|
||||
{
|
||||
drag_click.add( slot );
|
||||
if ( drag_click.size() > 1 )
|
||||
this.drag_click.add( slot );
|
||||
if ( this.drag_click.size() > 1 )
|
||||
{
|
||||
for (Slot dr : drag_click)
|
||||
for (Slot dr : this.drag_click)
|
||||
{
|
||||
PacketInventoryAction p = new PacketInventoryAction( c == 0 ? InventoryAction.PICKUP_OR_SET_DOWN : InventoryAction.PLACE_SINGLE,
|
||||
dr.slotNumber, 0 );
|
||||
@@ -450,9 +450,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for (Slot s : slots)
|
||||
{
|
||||
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
|
||||
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) this.inventorySlots).getPlayerInv() )
|
||||
{
|
||||
if ( !s.canTakeStack( ((AEBaseContainer) inventorySlots).getPlayerInv().player ) )
|
||||
if ( !s.canTakeStack( ((AEBaseContainer) this.inventorySlots).getPlayerInv().player ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -468,7 +468,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
for (Slot s : slots)
|
||||
{
|
||||
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() )
|
||||
if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) this.inventorySlots).getPlayerInv() )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwapSlots( s.slotNumber, theSlot.slotNumber ) );
|
||||
return true;
|
||||
@@ -488,10 +488,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
super.drawScreen( mouse_x, mouse_y, btn );
|
||||
|
||||
boolean hasClicked = Mouse.isButtonDown( 0 );
|
||||
if ( hasClicked && myScrollBar != null )
|
||||
myScrollBar.click( this, mouse_x - guiLeft, mouse_y - guiTop );
|
||||
if ( hasClicked && this.myScrollBar != null )
|
||||
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
|
||||
|
||||
for (Object c : buttonList)
|
||||
for (Object c : this.buttonList)
|
||||
{
|
||||
if ( c instanceof ITooltip )
|
||||
{
|
||||
@@ -508,7 +508,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
String msg = tooltip.getMessage();
|
||||
if ( msg != null )
|
||||
drawTooltip( x + 11, y + 4, 0, msg );
|
||||
this.drawTooltip( x + 11, y + 4, 0, msg );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -532,7 +532,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
for (var6 = 0; var6 < var4.length; ++var6)
|
||||
{
|
||||
var7 = fontRendererObj.getStringWidth( var4[var6] );
|
||||
var7 = this.fontRendererObj.getStringWidth( var4[var6] );
|
||||
|
||||
if ( var7 > var5 )
|
||||
{
|
||||
@@ -637,10 +637,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
@Override
|
||||
final protected void drawGuiContainerBackgroundLayer(float f, int x, int y)
|
||||
{
|
||||
int ox = guiLeft; // (width - xSize) / 2;
|
||||
int oy = guiTop; // (height - ySize) / 2;
|
||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
drawBG( ox, oy, x, y );
|
||||
this.drawBG( ox, oy, x, y );
|
||||
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for (Slot slot : slots)
|
||||
@@ -671,30 +671,30 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
@Override
|
||||
final protected void drawGuiContainerForegroundLayer(int x, int y)
|
||||
{
|
||||
int ox = guiLeft; // (width - xSize) / 2;
|
||||
int oy = guiTop; // (height - ySize) / 2;
|
||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
int oy = this.guiTop; // (height - ySize) / 2;
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
if ( myScrollBar != null )
|
||||
myScrollBar.draw( this );
|
||||
if ( this.myScrollBar != null )
|
||||
this.myScrollBar.draw( this );
|
||||
|
||||
drawFG( ox, oy, x, y );
|
||||
this.drawFG( ox, oy, x, y );
|
||||
}
|
||||
|
||||
protected String getGuiDisplayName(String in)
|
||||
{
|
||||
return hasCustomInventoryName() ? getInventoryName() : in;
|
||||
return this.hasCustomInventoryName() ? this.getInventoryName() : in;
|
||||
}
|
||||
|
||||
private String getInventoryName()
|
||||
{
|
||||
return ((AEBaseContainer) inventorySlots).customName;
|
||||
return ((AEBaseContainer) this.inventorySlots).customName;
|
||||
}
|
||||
|
||||
private boolean hasCustomInventoryName()
|
||||
{
|
||||
if ( inventorySlots instanceof AEBaseContainer )
|
||||
return ((AEBaseContainer) inventorySlots).customName != null;
|
||||
if ( this.inventorySlots instanceof AEBaseContainer )
|
||||
return ((AEBaseContainer) this.inventorySlots).customName != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for (Slot slot : slots)
|
||||
{
|
||||
// isPointInRegion
|
||||
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
if ( this.func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mouseX, mouseY ) )
|
||||
{
|
||||
return slot;
|
||||
}
|
||||
@@ -761,25 +761,25 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
public void a(Slot s)
|
||||
{
|
||||
drawSlot( s );
|
||||
this.drawSlot( s );
|
||||
}
|
||||
|
||||
public void func_146977_a(Slot s)
|
||||
{
|
||||
drawSlot( s );
|
||||
this.drawSlot( s );
|
||||
}
|
||||
|
||||
public void drawSlot(Slot s)
|
||||
{
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
RenderItem pIR = setItemRender( aeRenderItem );
|
||||
RenderItem pIR = this.setItemRender( this.aeRenderItem );
|
||||
try
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
itemRender.zLevel = 100.0F;
|
||||
|
||||
if ( !isPowered() )
|
||||
if ( !this.isPowered() )
|
||||
{
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66111111 );
|
||||
@@ -789,9 +789,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
|
||||
aeRenderItem.aeStack = ((SlotME) s).getAEStack();
|
||||
this.aeRenderItem.aeStack = ((SlotME) s).getAEStack();
|
||||
|
||||
safeDrawSlot( s );
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
@@ -799,7 +799,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if ( Platform.isDrawing( Tessellator.instance ) )
|
||||
Tessellator.instance.draw();
|
||||
}
|
||||
setItemRender( pIR );
|
||||
this.setItemRender( pIR );
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -812,7 +812,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
AppEngSlot aes = (AppEngSlot) s;
|
||||
if ( aes.getIcon() >= 0 )
|
||||
{
|
||||
bindTexture( "guis/states.png" );
|
||||
this.bindTexture( "guis/states.png" );
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
@@ -894,10 +894,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if ( s instanceof AppEngSlot )
|
||||
{
|
||||
((AppEngSlot) s).isDisplay = true;
|
||||
safeDrawSlot( s );
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
else
|
||||
safeDrawSlot( s );
|
||||
this.safeDrawSlot( s );
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -907,7 +907,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
// do the usual for non-ME Slots.
|
||||
safeDrawSlot( s );
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
{
|
||||
if ( stack != null )
|
||||
{
|
||||
Slot s = getSlot( mouseX, mouseY );
|
||||
Slot s = this.getSlot( mouseX, mouseY );
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
@@ -78,7 +78,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
@Override
|
||||
protected void renderToolTip(ItemStack stack, int x, int y)
|
||||
{
|
||||
Slot s = getSlot( x, y );
|
||||
Slot s = this.getSlot( x, y );
|
||||
if ( s instanceof SlotME && stack != null )
|
||||
{
|
||||
int BigNumber = AEConfig.instance.useTerminalUseLargeFont() ? 999 : 9999;
|
||||
@@ -105,13 +105,13 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
if ( myStack.getCountRequestable() > 0 )
|
||||
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
|
||||
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
this.drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
}
|
||||
else if ( stack.stackSize > BigNumber )
|
||||
{
|
||||
List var4 = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
var4.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
||||
drawTooltip( x, y, 0, join( var4, "\n" ) );
|
||||
this.drawTooltip( x, y, 0, join( var4, "\n" ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,37 +54,37 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
|
||||
public GuiCellWorkbench(InventoryPlayer inventoryPlayer, TileCellWorkbench te) {
|
||||
super( new ContainerCellWorkbench( inventoryPlayer, te ) );
|
||||
workbench = (ContainerCellWorkbench) inventorySlots;
|
||||
ySize = 251;
|
||||
tcw = te;
|
||||
this.workbench = (ContainerCellWorkbench) this.inventorySlots;
|
||||
this.ySize = 251;
|
||||
this.tcw = te;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean drawUpgrades()
|
||||
{
|
||||
return workbench.availableUpgrades() > 0;
|
||||
return this.workbench.availableUpgrades() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
handleButtonVisibility();
|
||||
this.handleButtonVisibility();
|
||||
|
||||
bindTexture( getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
||||
if ( drawUpgrades() )
|
||||
this.bindTexture( this.getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
if ( this.drawUpgrades() )
|
||||
{
|
||||
if ( workbench.availableUpgrades() <= 8 )
|
||||
if ( this.workbench.availableUpgrades() <= 8 )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + workbench.availableUpgrades() * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (workbench.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 7 + this.workbench.availableUpgrades() * 18 );
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY + (7 + (this.workbench.availableUpgrades()) * 18), 177, 151, 35, 7 );
|
||||
}
|
||||
else if ( workbench.availableUpgrades() <= 16 )
|
||||
else if ( this.workbench.availableUpgrades() <= 16 )
|
||||
{
|
||||
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 = workbench.availableUpgrades() - 8;
|
||||
int dx = this.workbench.availableUpgrades() - 8;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if ( dx == 8 )
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||
@@ -100,7 +100,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 = workbench.availableUpgrades() - 16;
|
||||
int dx = this.workbench.availableUpgrades() - 16;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if ( dx == 8 )
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + (7 + (dx) * 18), 186, 151, 35 - 8, 7 );
|
||||
@@ -108,8 +108,8 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18 + 4, offsetY + (7 + (dx) * 18), 186 + 4, 151, 35 - 8, 7 );
|
||||
}
|
||||
}
|
||||
if ( hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + ySize - 90, 178, 161, 68, 68 );
|
||||
if ( this.hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, 161, 68, 68 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -117,23 +117,23 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( btn == copyMode )
|
||||
if ( btn == this.copyMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Action", "CopyMode" ) );
|
||||
}
|
||||
else if ( btn == partition )
|
||||
else if ( btn == this.partition )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Action", "Partition" ) );
|
||||
}
|
||||
else if ( btn == clear )
|
||||
else if ( btn == this.clear )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Action", "Clear" ) );
|
||||
}
|
||||
else if ( btn == fuzzyMode )
|
||||
else if ( btn == this.fuzzyMode )
|
||||
{
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
FuzzyMode fz = (FuzzyMode) fuzzyMode.getCurrentValue();
|
||||
FuzzyMode fz = (FuzzyMode) this.fuzzyMode.getCurrentValue();
|
||||
fz = Platform.rotateEnum( fz, backwards, Settings.FUZZY_MODE.getPossibleValues() );
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() ) );
|
||||
@@ -149,24 +149,24 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
clear = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
|
||||
partition = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
|
||||
copyMode = new GuiToggleButton( this.guiLeft - 18, guiTop + 48, 11 * 16 + 5, 12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal() );
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 68, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.clear = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
|
||||
this.partition = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
|
||||
this.copyMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5, 12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal() );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
buttonList.add( fuzzyMode );
|
||||
buttonList.add( partition );
|
||||
buttonList.add( clear );
|
||||
buttonList.add( copyMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.partition );
|
||||
this.buttonList.add( this.clear );
|
||||
this.buttonList.add( this.copyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
copyMode.setState( workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||
this.copyMode.setState( this.workbench.copyMode == CopyMode.CLEAR_ON_REMOVE );
|
||||
|
||||
boolean hasFuzzy = false;
|
||||
IInventory inv = workbench.getCellUpgradeInventory();
|
||||
IInventory inv = this.workbench.getCellUpgradeInventory();
|
||||
for (int x = 0; x < inv.getSizeInventory(); x++)
|
||||
{
|
||||
ItemStack is = inv.getStackInSlot( x );
|
||||
@@ -176,7 +176,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
hasFuzzy = true;
|
||||
}
|
||||
}
|
||||
fuzzyMode.setVisibility( hasFuzzy );
|
||||
this.fuzzyMode.setVisibility( hasFuzzy );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GuiChest extends AEBaseGui
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
if ( par1GuiButton == priority )
|
||||
if ( par1GuiButton == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class GuiChest extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
}
|
||||
|
||||
public GuiChest(InventoryPlayer inventoryPlayer, TileChest te) {
|
||||
@@ -61,15 +61,15 @@ public class GuiChest extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Chest.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
public GuiCondenser(InventoryPlayer inventoryPlayer, TileCondenser te)
|
||||
{
|
||||
super( new ContainerCondenser( inventoryPlayer, te ) );
|
||||
cvc = (ContainerCondenser) inventorySlots;
|
||||
this.cvc = (ContainerCondenser) this.inventorySlots;
|
||||
this.ySize = 197;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( mode == btn )
|
||||
if ( this.mode == btn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
|
||||
}
|
||||
@@ -67,30 +67,30 @@ public class GuiCondenser extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( cvc, "guis/condenser.png", 120 + guiLeft, 25 + guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal() );
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal() );
|
||||
|
||||
mode = new GuiImgButton( 128 + guiLeft, 52 + guiTop, Settings.CONDENSER_OUTPUT, cvc.output );
|
||||
this.mode = new GuiImgButton( 128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT, this.cvc.output );
|
||||
|
||||
this.buttonList.add( pb );
|
||||
this.buttonList.add( mode );
|
||||
this.buttonList.add( this.pb );
|
||||
this.buttonList.add( this.mode );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/condenser.png" );
|
||||
this.bindTexture( "guis/condenser.png" );
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Condenser.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
mode.set( cvc.output );
|
||||
mode.fillVar = String.valueOf( cvc.output.requiredPower );
|
||||
this.mode.set( this.cvc.output );
|
||||
this.mode.fillVar = String.valueOf( this.cvc.output.requiredPower );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -66,55 +66,55 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
int c = AEConfig.instance.craftItemsByStackAmounts( 2 );
|
||||
int d = AEConfig.instance.craftItemsByStackAmounts( 3 );
|
||||
|
||||
buttonList.add( plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 26, 22, 20, "+" + a ) );
|
||||
buttonList.add( plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 26, 28, 20, "+" + b ) );
|
||||
buttonList.add( plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 26, 32, 20, "+" + c ) );
|
||||
buttonList.add( plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 26, 38, 20, "+" + d ) );
|
||||
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 ) );
|
||||
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 26, 32, 20, "+" + c ) );
|
||||
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 26, 38, 20, "+" + d ) );
|
||||
|
||||
buttonList.add( minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 75, 22, 20, "-" + a ) );
|
||||
buttonList.add( minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 75, 28, 20, "-" + b ) );
|
||||
buttonList.add( minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 75, 32, 20, "-" + c ) );
|
||||
buttonList.add( minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 75, 38, 20, "-" + d ) );
|
||||
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 75, 22, 20, "-" + a ) );
|
||||
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 75, 28, 20, "-" + b ) );
|
||||
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 75, 32, 20, "-" + c ) );
|
||||
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 75, 38, 20, "-" + d ) );
|
||||
|
||||
buttonList.add( next = new GuiButton( 0, this.guiLeft + 128, this.guiTop + 51, 38, 20, GuiText.Next.getLocal() ) );
|
||||
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) inventorySlots).getTarget();
|
||||
Object target = ((AEBaseContainer) this.inventorySlots).getTarget();
|
||||
|
||||
if ( target instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
myIcon = AEApi.instance().items().itemWirelessTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
}
|
||||
|
||||
if ( target instanceof PartTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_ME;
|
||||
this.OriginalGui = GuiBridge.GUI_ME;
|
||||
}
|
||||
|
||||
if ( target instanceof PartCraftingTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partCraftingTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
}
|
||||
|
||||
if ( target instanceof PartPatternTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partPatternTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
}
|
||||
|
||||
if ( OriginalGui != null )
|
||||
buttonList.add( originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
if ( this.OriginalGui != null )
|
||||
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
|
||||
amountToCraft = new GuiNumberBox( fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, fontRendererObj.FONT_HEIGHT, Integer.class );
|
||||
amountToCraft.setEnableBackgroundDrawing( false );
|
||||
amountToCraft.setMaxStringLength( 16 );
|
||||
amountToCraft.setTextColor( 0xFFFFFF );
|
||||
amountToCraft.setVisible( true );
|
||||
amountToCraft.setFocused( true );
|
||||
amountToCraft.setText( "1" );
|
||||
this.amountToCraft = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Integer.class );
|
||||
this.amountToCraft.setEnableBackgroundDrawing( false );
|
||||
this.amountToCraft.setMaxStringLength( 16 );
|
||||
this.amountToCraft.setTextColor( 0xFFFFFF );
|
||||
this.amountToCraft.setVisible( true );
|
||||
this.amountToCraft.setFocused( true );
|
||||
this.amountToCraft.setText( "1" );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,12 +125,12 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
try
|
||||
{
|
||||
|
||||
if ( btn == originalGuiBtn )
|
||||
if ( btn == this.originalGuiBtn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( this.OriginalGui ) );
|
||||
}
|
||||
|
||||
if ( btn == next )
|
||||
if ( btn == this.next )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketCraftRequest( Integer.parseInt( this.amountToCraft.getText() ), isShiftKeyDown() ) );
|
||||
}
|
||||
@@ -139,21 +139,21 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
// nope..
|
||||
amountToCraft.setText( "1" );
|
||||
this.amountToCraft.setText( "1" );
|
||||
}
|
||||
|
||||
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
||||
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;
|
||||
|
||||
if ( isPlus || isMinus )
|
||||
addQty( getQty( btn ) );
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
|
||||
private void addQty(int i)
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = amountToCraft.getText();
|
||||
String Out = this.amountToCraft.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -163,7 +163,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
amountToCraft.setText( Out );
|
||||
this.amountToCraft.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -179,7 +179,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
|
||||
Out = Long.toString( result );
|
||||
Integer.parseInt( Out );
|
||||
amountToCraft.setText( Out );
|
||||
this.amountToCraft.setText( Out );
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
@@ -194,14 +194,14 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
{
|
||||
if ( key == 28 )
|
||||
{
|
||||
actionPerformed( next );
|
||||
this.actionPerformed( this.next );
|
||||
}
|
||||
if ( (key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ))
|
||||
&& amountToCraft.textboxKeyTyped( character, key ) )
|
||||
&& this.amountToCraft.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = amountToCraft.getText();
|
||||
String Out = this.amountToCraft.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -211,7 +211,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
amountToCraft.setText( Out );
|
||||
this.amountToCraft.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -219,7 +219,7 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
long result = Long.parseLong( Out );
|
||||
if ( result < 0 )
|
||||
{
|
||||
amountToCraft.setText( "1" );
|
||||
this.amountToCraft.setText( "1" );
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
@@ -237,22 +237,22 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
|
||||
this.next.displayString = isShiftKeyDown() ? GuiText.Start.getLocal() : GuiText.Next.getLocal();
|
||||
|
||||
bindTexture( "guis/craftAmt.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/craftAmt.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
try
|
||||
{
|
||||
Long.parseLong( amountToCraft.getText() );
|
||||
next.enabled = amountToCraft.getText().length() > 0;
|
||||
Long.parseLong( this.amountToCraft.getText() );
|
||||
this.next.enabled = this.amountToCraft.getText().length() > 0;
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
next.enabled = false;
|
||||
this.next.enabled = false;
|
||||
}
|
||||
|
||||
amountToCraft.drawTextBox();
|
||||
this.amountToCraft.drawTextBox();
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -263,6 +263,6 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.SelectAmount.getLocal(), 8, 6, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,33 +71,33 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
boolean isAutoStart()
|
||||
{
|
||||
return ((ContainerCraftConfirm) inventorySlots).autoStart;
|
||||
return ((ContainerCraftConfirm) this.inventorySlots).autoStart;
|
||||
}
|
||||
|
||||
boolean isSimulation()
|
||||
{
|
||||
return ((ContainerCraftConfirm) inventorySlots).simulation;
|
||||
return ((ContainerCraftConfirm) this.inventorySlots).simulation;
|
||||
}
|
||||
|
||||
public GuiCraftConfirm(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( new ContainerCraftConfirm( inventoryPlayer, te ) );
|
||||
xSize = 238;
|
||||
ySize = 206;
|
||||
myScrollBar = new GuiScrollbar();
|
||||
this.xSize = 238;
|
||||
this.ySize = 206;
|
||||
this.myScrollBar = new GuiScrollbar();
|
||||
|
||||
ccc = (ContainerCraftConfirm) this.inventorySlots;
|
||||
this.ccc = (ContainerCraftConfirm) this.inventorySlots;
|
||||
|
||||
if ( te instanceof WirelessTerminalGuiObject )
|
||||
OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
|
||||
if ( te instanceof PartTerminal )
|
||||
OriginalGui = GuiBridge.GUI_ME;
|
||||
this.OriginalGui = GuiBridge.GUI_ME;
|
||||
|
||||
if ( te instanceof PartCraftingTerminal )
|
||||
OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
|
||||
if ( te instanceof PartPatternTerminal )
|
||||
OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
|
||||
}
|
||||
|
||||
@@ -110,39 +110,39 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
start = new GuiButton( 0, this.guiLeft + 162, this.guiTop + ySize - 25, 50, 20, GuiText.Start.getLocal() );
|
||||
start.enabled = false;
|
||||
buttonList.add( start );
|
||||
this.start = new GuiButton( 0, this.guiLeft + 162, this.guiTop + this.ySize - 25, 50, 20, GuiText.Start.getLocal() );
|
||||
this.start.enabled = false;
|
||||
this.buttonList.add( this.start );
|
||||
|
||||
selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + (219 - 180) / 2, this.guiTop + this.ySize - 68, 180, 20, GuiText.CraftingCPU.getLocal() + ": "
|
||||
+ GuiText.Automatic );
|
||||
selectCPU.enabled = false;
|
||||
buttonList.add( selectCPU );
|
||||
this.selectCPU.enabled = false;
|
||||
this.buttonList.add( this.selectCPU );
|
||||
|
||||
if ( OriginalGui != null )
|
||||
cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
if ( this.OriginalGui != null )
|
||||
this.cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
|
||||
buttonList.add( cancel );
|
||||
this.buttonList.add( this.cancel );
|
||||
}
|
||||
|
||||
private void updateCPUButtonText()
|
||||
{
|
||||
String btnTextText = GuiText.CraftingCPU.getLocal() + ": " + GuiText.Automatic.getLocal();
|
||||
if ( ccc.selectedCpu >= 0 )// && ccc.selectedCpu < ccc.cpus.size() )
|
||||
if ( this.ccc.selectedCpu >= 0 )// && ccc.selectedCpu < ccc.cpus.size() )
|
||||
{
|
||||
if ( ccc.myName.length() > 0 )
|
||||
if ( this.ccc.myName.length() > 0 )
|
||||
{
|
||||
String name = ccc.myName.substring( 0, Math.min( 20, ccc.myName.length() ) );
|
||||
String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + ccc.selectedCpu;
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.selectedCpu;
|
||||
}
|
||||
|
||||
if ( ccc.noCPU )
|
||||
if ( this.ccc.noCPU )
|
||||
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
||||
|
||||
selectCPU.displayString = btnTextText;
|
||||
this.selectCPU.displayString = btnTextText;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -152,7 +152,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == selectCPU )
|
||||
if ( btn == this.selectCPU )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -164,12 +164,12 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
if ( btn == cancel )
|
||||
if ( btn == this.cancel )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( this.OriginalGui ) );
|
||||
}
|
||||
|
||||
if ( btn == start )
|
||||
if ( btn == this.start )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -185,9 +185,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
private long getTotal(IAEItemStack is)
|
||||
{
|
||||
IAEItemStack a = storage.findPrecise( is );
|
||||
IAEItemStack c = pending.findPrecise( is );
|
||||
IAEItemStack m = missing.findPrecise( is );
|
||||
IAEItemStack a = this.storage.findPrecise( is );
|
||||
IAEItemStack c = this.pending.findPrecise( is );
|
||||
IAEItemStack m = this.missing.findPrecise( is );
|
||||
|
||||
long total = 0;
|
||||
|
||||
@@ -209,34 +209,34 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
case 0:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( storage, l );
|
||||
this.handleInput( this.storage, l );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( pending, l );
|
||||
this.handleInput( this.pending, l );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( missing, l );
|
||||
this.handleInput( this.missing, l );
|
||||
break;
|
||||
}
|
||||
|
||||
for (IAEItemStack l : list)
|
||||
{
|
||||
long amt = getTotal( l );
|
||||
long amt = this.getTotal( l );
|
||||
|
||||
if ( amt <= 0 )
|
||||
deleteVisualStack( l );
|
||||
this.deleteVisualStack( l );
|
||||
else
|
||||
{
|
||||
IAEItemStack is = findVisualStack( l );
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
is.setStackSize( amt );
|
||||
}
|
||||
}
|
||||
|
||||
setScrollBar();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void handleInput(IItemList<IAEItemStack> s, IAEItemStack l)
|
||||
@@ -263,7 +263,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
private IAEItemStack findVisualStack(IAEItemStack l)
|
||||
{
|
||||
for (IAEItemStack o : visual)
|
||||
for (IAEItemStack o : this.visual)
|
||||
{
|
||||
if ( o.equals( l ) )
|
||||
{
|
||||
@@ -272,13 +272,13 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
IAEItemStack stack = l.copy();
|
||||
visual.add( stack );
|
||||
this.visual.add( stack );
|
||||
return stack;
|
||||
}
|
||||
|
||||
private void deleteVisualStack(IAEItemStack l)
|
||||
{
|
||||
Iterator<IAEItemStack> i = visual.iterator();
|
||||
Iterator<IAEItemStack> i = this.visual.iterator();
|
||||
while (i.hasNext())
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
@@ -292,10 +292,10 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = visual.size();
|
||||
int size = this.visual.size();
|
||||
|
||||
myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 );
|
||||
myScrollBar.setRange( 0, (size + 2) / 3 - rows, 1 );
|
||||
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 114 );
|
||||
this.myScrollBar.setRange( 0, (size + 2) / 3 - this.rows, 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,7 +305,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
if ( key == 28 )
|
||||
{
|
||||
actionPerformed( start );
|
||||
this.actionPerformed( this.start );
|
||||
}
|
||||
super.keyTyped( character, key );
|
||||
}
|
||||
@@ -314,9 +314,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
setScrollBar();
|
||||
bindTexture( "guis/craftingreport.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.setScrollBar();
|
||||
this.bindTexture( "guis/craftingreport.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
int tooltip = -1;
|
||||
@@ -324,19 +324,19 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
@Override
|
||||
public void drawScreen(int mouse_x, int mouse_y, float btn)
|
||||
{
|
||||
updateCPUButtonText();
|
||||
this.updateCPUButtonText();
|
||||
|
||||
start.enabled = !(ccc.noCPU || isSimulation());
|
||||
selectCPU.enabled = !isSimulation();
|
||||
this.start.enabled = !(this.ccc.noCPU || this.isSimulation());
|
||||
this.selectCPU.enabled = !this.isSimulation();
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
int gx = (width - xSize) / 2;
|
||||
int gy = (height - ySize) / 2;
|
||||
int gx = (this.width - this.xSize) / 2;
|
||||
int gy = (this.height - this.ySize) / 2;
|
||||
int offY = 23;
|
||||
|
||||
tooltip = -1;
|
||||
this.tooltip = -1;
|
||||
|
||||
for (int z = 0; z <= 4 * 5; z++)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||
{
|
||||
tooltip = z;
|
||||
this.tooltip = z;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -368,21 +368,21 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
long BytesUsed = ccc.bytesUsed;
|
||||
long BytesUsed = this.ccc.bytesUsed;
|
||||
String byteUsed = NumberFormat.getInstance().format( BytesUsed );
|
||||
String Add = BytesUsed > 0 ? (byteUsed + ' ' + GuiText.BytesUsed.getLocal()) : GuiText.CalculatingWait.getLocal();
|
||||
fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.CraftingPlan.getLocal() + " - " + Add, 8, 7, 4210752 );
|
||||
|
||||
String dsp = null;
|
||||
|
||||
if ( isSimulation() )
|
||||
if ( this.isSimulation() )
|
||||
dsp = GuiText.Simulation.getLocal();
|
||||
else
|
||||
dsp = ccc.cpuBytesAvail > 0 ? (GuiText.Bytes.getLocal() + ": " + ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + ccc.cpuCoProcessors)
|
||||
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 - fontRendererObj.getStringWidth( dsp )) / 2;
|
||||
fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
||||
int offset = (219 - this.fontRendererObj.getStringWidth( dsp )) / 2;
|
||||
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
||||
|
||||
int sectionLength = 67;
|
||||
|
||||
@@ -390,8 +390,8 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
int y = 0;
|
||||
int xo = 9;
|
||||
int yo = 22;
|
||||
int viewStart = myScrollBar.getCurrentScroll() * 3;
|
||||
int viewEnd = viewStart + 3 * rows;
|
||||
int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
||||
int viewEnd = viewStart + 3 * this.rows;
|
||||
|
||||
String dspToolTip = "";
|
||||
List<String> lineList = new LinkedList<String>();
|
||||
@@ -400,17 +400,17 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
int offY = 23;
|
||||
|
||||
for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++)
|
||||
for (int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++)
|
||||
{
|
||||
IAEItemStack refStack = visual.get( z );// repo.getReferenceItem( z );
|
||||
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
if ( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScaled( 0.5, 0.5, 0.5 );
|
||||
|
||||
IAEItemStack stored = storage.findPrecise( refStack );
|
||||
IAEItemStack pendingStack = pending.findPrecise( refStack );
|
||||
IAEItemStack missingStack = missing.findPrecise( refStack );
|
||||
IAEItemStack stored = this.storage.findPrecise( refStack );
|
||||
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||
IAEItemStack missingStack = this.missing.findPrecise( refStack );
|
||||
|
||||
int lines = 0;
|
||||
|
||||
@@ -434,11 +434,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
|
||||
downY += 5;
|
||||
@@ -453,11 +453,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
str = Long.toString( missingStack.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.Missing.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
|
||||
|
||||
red = true;
|
||||
@@ -473,11 +473,11 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
|
||||
}
|
||||
@@ -488,7 +488,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
ItemStack is = refStack.copy().getItemStack();
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
{
|
||||
dspToolTip = Platform.getItemDisplayName( is );
|
||||
|
||||
@@ -499,7 +499,7 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
toolPosY = y * offY + yo;
|
||||
}
|
||||
|
||||
drawItem( posX, posY, is );
|
||||
this.drawItem( posX, posY, is );
|
||||
|
||||
if ( red )
|
||||
{
|
||||
@@ -519,10 +519,10 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
|
||||
}
|
||||
|
||||
if ( tooltip >= 0 && dspToolTip.length() > 0 )
|
||||
if ( this.tooltip >= 0 && dspToolTip.length() > 0 )
|
||||
{
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
drawTooltip( toolPosX, toolPosY + 10, 0, dspToolTip );
|
||||
this.drawTooltip( toolPosX, toolPosY + 10, 0, dspToolTip );
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
@@ -62,17 +62,17 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
public void clearItems()
|
||||
{
|
||||
storage = AEApi.instance().storage().createItemList();
|
||||
active = AEApi.instance().storage().createItemList();
|
||||
pending = AEApi.instance().storage().createItemList();
|
||||
visual = new ArrayList<IAEItemStack>();
|
||||
this.storage = AEApi.instance().storage().createItemList();
|
||||
this.active = AEApi.instance().storage().createItemList();
|
||||
this.pending = AEApi.instance().storage().createItemList();
|
||||
this.visual = new ArrayList<IAEItemStack>();
|
||||
}
|
||||
|
||||
protected GuiCraftingCPU(ContainerCraftingCPU container) {
|
||||
super( container );
|
||||
this.ySize = 184;
|
||||
this.xSize = 238;
|
||||
myScrollBar = new GuiScrollbar();
|
||||
this.myScrollBar = new GuiScrollbar();
|
||||
}
|
||||
|
||||
public GuiCraftingCPU(InventoryPlayer inventoryPlayer, Object te) {
|
||||
@@ -86,7 +86,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
if ( cancel == btn )
|
||||
if ( this.cancel == btn )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -103,16 +103,16 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
setScrollBar();
|
||||
cancel = new GuiButton( 0, this.guiLeft + 163, this.guiTop + ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
buttonList.add( cancel );
|
||||
this.setScrollBar();
|
||||
this.cancel = new GuiButton( 0, this.guiLeft + 163, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
this.buttonList.add( this.cancel );
|
||||
}
|
||||
|
||||
private long getTotal(IAEItemStack is)
|
||||
{
|
||||
IAEItemStack a = storage.findPrecise( is );
|
||||
IAEItemStack b = active.findPrecise( is );
|
||||
IAEItemStack c = pending.findPrecise( is );
|
||||
IAEItemStack a = this.storage.findPrecise( is );
|
||||
IAEItemStack b = this.active.findPrecise( is );
|
||||
IAEItemStack c = this.pending.findPrecise( is );
|
||||
|
||||
long total = 0;
|
||||
|
||||
@@ -134,34 +134,34 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
case 0:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( storage, l );
|
||||
this.handleInput( this.storage, l );
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( active, l );
|
||||
this.handleInput( this.active, l );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for (IAEItemStack l : list)
|
||||
handleInput( pending, l );
|
||||
this.handleInput( this.pending, l );
|
||||
break;
|
||||
}
|
||||
|
||||
for (IAEItemStack l : list)
|
||||
{
|
||||
long amt = getTotal( l );
|
||||
long amt = this.getTotal( l );
|
||||
|
||||
if ( amt <= 0 )
|
||||
deleteVisualStack( l );
|
||||
this.deleteVisualStack( l );
|
||||
else
|
||||
{
|
||||
IAEItemStack is = findVisualStack( l );
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
is.setStackSize( amt );
|
||||
}
|
||||
}
|
||||
|
||||
setScrollBar();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void handleInput(IItemList<IAEItemStack> s, IAEItemStack l)
|
||||
@@ -188,7 +188,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
private IAEItemStack findVisualStack(IAEItemStack l)
|
||||
{
|
||||
for (IAEItemStack o : visual)
|
||||
for (IAEItemStack o : this.visual)
|
||||
{
|
||||
if ( o.equals( l ) )
|
||||
{
|
||||
@@ -197,13 +197,13 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
IAEItemStack stack = l.copy();
|
||||
visual.add( stack );
|
||||
this.visual.add( stack );
|
||||
return stack;
|
||||
}
|
||||
|
||||
private void deleteVisualStack(IAEItemStack l)
|
||||
{
|
||||
Iterator<IAEItemStack> i = visual.iterator();
|
||||
Iterator<IAEItemStack> i = this.visual.iterator();
|
||||
while (i.hasNext())
|
||||
{
|
||||
IAEItemStack o = i.next();
|
||||
@@ -217,17 +217,17 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = visual.size();
|
||||
int size = this.visual.size();
|
||||
|
||||
myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 137 );
|
||||
myScrollBar.setRange( 0, (size + 2) / 3 - rows, 1 );
|
||||
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 137 );
|
||||
this.myScrollBar.setRange( 0, (size + 2) / 3 - this.rows, 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/craftingcpu.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/craftingcpu.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
int tooltip = -1;
|
||||
@@ -235,16 +235,16 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
@Override
|
||||
public void drawScreen(int mouse_x, int mouse_y, float btn)
|
||||
{
|
||||
cancel.enabled = !visual.isEmpty();
|
||||
this.cancel.enabled = !this.visual.isEmpty();
|
||||
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
int gx = (width - xSize) / 2;
|
||||
int gy = (height - ySize) / 2;
|
||||
int gx = (this.width - this.xSize) / 2;
|
||||
int gy = (this.height - this.ySize) / 2;
|
||||
int offY = 23;
|
||||
|
||||
tooltip = -1;
|
||||
this.tooltip = -1;
|
||||
|
||||
for (int z = 0; z <= 4 * 5; z++)
|
||||
{
|
||||
@@ -255,7 +255,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
if ( minY < mouse_y && minY + offY - 2 > mouse_y )
|
||||
{
|
||||
tooltip = z;
|
||||
this.tooltip = z;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.CraftingStatus.getLocal() ), 8, 7, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() ), 8, 7, 4210752 );
|
||||
|
||||
int sectionLength = 67;
|
||||
|
||||
@@ -284,7 +284,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
int y = 0;
|
||||
int xo = 9;
|
||||
int yo = 22;
|
||||
int viewStart = myScrollBar.getCurrentScroll() * 3;
|
||||
int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
||||
int viewEnd = viewStart + 3 * 6;
|
||||
|
||||
String dspToolTip = "";
|
||||
@@ -294,17 +294,17 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
int offY = 23;
|
||||
|
||||
for (int z = viewStart; z < Math.min( viewEnd, visual.size() ); z++)
|
||||
for (int z = viewStart; z < Math.min( viewEnd, this.visual.size() ); z++)
|
||||
{
|
||||
IAEItemStack refStack = visual.get( z );// repo.getReferenceItem( z );
|
||||
IAEItemStack refStack = this.visual.get( z );// repo.getReferenceItem( z );
|
||||
if ( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScaled( 0.5, 0.5, 0.5 );
|
||||
|
||||
IAEItemStack stored = storage.findPrecise( refStack );
|
||||
IAEItemStack activeStack = active.findPrecise( refStack );
|
||||
IAEItemStack pendingStack = pending.findPrecise( refStack );
|
||||
IAEItemStack stored = this.storage.findPrecise( refStack );
|
||||
IAEItemStack activeStack = this.active.findPrecise( refStack );
|
||||
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
|
||||
|
||||
int lines = 0;
|
||||
|
||||
@@ -327,11 +327,11 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.Stored.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
|
||||
downY += 5;
|
||||
@@ -346,11 +346,11 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.Crafting.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
|
||||
|
||||
downY += 5;
|
||||
@@ -365,11 +365,11 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||
|
||||
str = GuiText.Scheduled.getLocal() + ": " + str;
|
||||
int w = 4 + fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * (1 + sectionLength) + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * offY + yo
|
||||
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 ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
|
||||
}
|
||||
@@ -380,7 +380,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
ItemStack is = refStack.copy().getItemStack();
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
{
|
||||
dspToolTip = Platform.getItemDisplayName( is );
|
||||
|
||||
@@ -391,7 +391,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
toolPosY = y * offY + yo;
|
||||
}
|
||||
|
||||
drawItem( posX, posY, is );
|
||||
this.drawItem( posX, posY, is );
|
||||
|
||||
x++;
|
||||
|
||||
@@ -404,10 +404,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
|
||||
}
|
||||
|
||||
if ( tooltip >= 0 && dspToolTip.length() > 0 )
|
||||
if ( this.tooltip >= 0 && dspToolTip.length() > 0 )
|
||||
{
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
drawTooltip( toolPosX, toolPosY + 10, 0, dspToolTip );
|
||||
this.drawTooltip( toolPosX, toolPosY + 10, 0, dspToolTip );
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
@@ -57,31 +57,31 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
public GuiCraftingStatus(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( new ContainerCraftingStatus( inventoryPlayer, te ) );
|
||||
|
||||
ccc = (ContainerCraftingStatus) inventorySlots;
|
||||
Object target = ccc.getTarget();
|
||||
this.ccc = (ContainerCraftingStatus) this.inventorySlots;
|
||||
Object target = this.ccc.getTarget();
|
||||
|
||||
if ( target instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
myIcon = AEApi.instance().items().itemWirelessTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
this.myIcon = AEApi.instance().items().itemWirelessTerminal.stack( 1 );
|
||||
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
}
|
||||
|
||||
if ( target instanceof PartTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_ME;
|
||||
this.myIcon = AEApi.instance().parts().partTerminal.stack( 1 );
|
||||
this.OriginalGui = GuiBridge.GUI_ME;
|
||||
}
|
||||
|
||||
if ( target instanceof PartCraftingTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partCraftingTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
this.myIcon = AEApi.instance().parts().partCraftingTerminal.stack( 1 );
|
||||
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
}
|
||||
|
||||
if ( target instanceof PartPatternTerminal )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partPatternTerminal.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
this.myIcon = AEApi.instance().parts().partPatternTerminal.stack( 1 );
|
||||
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == selectCPU )
|
||||
if ( btn == this.selectCPU )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -104,9 +104,9 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
}
|
||||
}
|
||||
|
||||
if ( btn == originalGuiBtn )
|
||||
if ( btn == this.originalGuiBtn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( this.OriginalGui ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,14 +121,14 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
this.selectCPU = new GuiButton( 0, this.guiLeft + 8, this.guiTop + this.ySize - 25, 150, 20, GuiText.CraftingCPU.getLocal() + ": " + GuiText.NoCraftingCPUs );
|
||||
// selectCPU.enabled = false;
|
||||
buttonList.add( selectCPU );
|
||||
this.buttonList.add( this.selectCPU );
|
||||
|
||||
if ( myIcon != null )
|
||||
if ( this.myIcon != null )
|
||||
{
|
||||
buttonList.add( originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
originalGuiBtn.hideEdge = 13;
|
||||
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 213, this.guiTop - 4, this.myIcon, this.myIcon.getDisplayName(), itemRender ) );
|
||||
this.originalGuiBtn.hideEdge = 13;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,27 +136,27 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
{
|
||||
String btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||
|
||||
if ( ccc.selectedCpu >= 0 )// && ccc.selectedCpu < ccc.cpus.size() )
|
||||
if ( this.ccc.selectedCpu >= 0 )// && ccc.selectedCpu < ccc.cpus.size() )
|
||||
{
|
||||
if ( ccc.myName.length() > 0 )
|
||||
if ( this.ccc.myName.length() > 0 )
|
||||
{
|
||||
String name = ccc.myName.substring( 0, Math.min( 20, ccc.myName.length() ) );
|
||||
String name = this.ccc.myName.substring( 0, Math.min( 20, this.ccc.myName.length() ) );
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": #" + ccc.selectedCpu;
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": #" + this.ccc.selectedCpu;
|
||||
}
|
||||
|
||||
if ( ccc.noCPU )
|
||||
if ( this.ccc.noCPU )
|
||||
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||
|
||||
selectCPU.displayString = btnTextText;
|
||||
this.selectCPU.displayString = btnTextText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouse_x, int mouse_y, float btn)
|
||||
{
|
||||
updateCPUButtonText();
|
||||
this.updateCPUButtonText();
|
||||
super.drawScreen( mouse_x, mouse_y, btn );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
buttonList.add( clearBtn = new GuiImgButton( this.guiLeft + 92, this.guiTop + this.ySize - 156, Settings.ACTIONS, ActionItems.STASH ) );
|
||||
clearBtn.halfSize = true;
|
||||
this.buttonList.add( this.clearBtn = new GuiImgButton( this.guiLeft + 92, this.guiTop + this.ySize - 156, Settings.ACTIONS, ActionItems.STASH ) );
|
||||
this.clearBtn.halfSize = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -51,10 +51,10 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
if ( clearBtn == btn )
|
||||
if ( this.clearBtn == btn )
|
||||
{
|
||||
Slot s = null;
|
||||
Container c = inventorySlots;
|
||||
Container c = this.inventorySlots;
|
||||
for (Object j : c.inventorySlots)
|
||||
{
|
||||
if ( j instanceof SlotCraftingMatrix )
|
||||
@@ -72,7 +72,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
|
||||
public GuiCraftingTerm(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( inventoryPlayer, te, new ContainerCraftingTerm( inventoryPlayer, te ) );
|
||||
reservedSpace = 73;
|
||||
this.reservedSpace = 73;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,7 +85,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class GuiDrive extends AEBaseGui
|
||||
{
|
||||
super.actionPerformed( par1GuiButton );
|
||||
|
||||
if ( par1GuiButton == priority )
|
||||
if ( par1GuiButton == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class GuiDrive extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
}
|
||||
|
||||
public GuiDrive(InventoryPlayer inventoryPlayer, TileDrive te) {
|
||||
@@ -61,15 +61,15 @@ public class GuiDrive extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/drive.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/drive.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Drive.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,21 +44,21 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.FormationPlane.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( fuzzyMode != null )
|
||||
fuzzyMode.set( cvb.fzMode );
|
||||
if ( this.fuzzyMode != null )
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
|
||||
buttonList.add( fuzzyMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +66,7 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
if ( btn == priority )
|
||||
if ( btn == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
|
||||
@@ -35,15 +35,15 @@ public class GuiGrinder extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/grinder.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/grinder.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.GrindStone.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,29 +57,29 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.IOPort.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( redstoneMode != null )
|
||||
redstoneMode.set( cvb.rsMode );
|
||||
if ( this.redstoneMode != null )
|
||||
this.redstoneMode.set( this.cvb.rsMode );
|
||||
|
||||
if ( operationMode != null )
|
||||
operationMode.set( ((ContainerIOPort) cvb).opMode );
|
||||
if ( this.operationMode != null )
|
||||
this.operationMode.set( ((ContainerIOPort) this.cvb).opMode );
|
||||
|
||||
if ( fullMode != null )
|
||||
fullMode.set( ((ContainerIOPort) cvb).fMode );
|
||||
if ( this.fullMode != null )
|
||||
this.fullMode.set( ((ContainerIOPort) this.cvb).fMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
fullMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.FULLNESS_MODE, FullnessMode.EMPTY );
|
||||
operationMode = new GuiImgButton( this.guiLeft + 80, guiTop + 17, Settings.OPERATION_MODE, OperationMode.EMPTY );
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.fullMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.FULLNESS_MODE, FullnessMode.EMPTY );
|
||||
this.operationMode = new GuiImgButton( this.guiLeft + 80, this.guiTop + 17, Settings.OPERATION_MODE, OperationMode.EMPTY );
|
||||
|
||||
buttonList.add( operationMode );
|
||||
buttonList.add( redstoneMode );
|
||||
buttonList.add( fullMode );
|
||||
this.buttonList.add( this.operationMode );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.buttonList.add( this.fullMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,11 +89,11 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == fullMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fullMode.getSetting(), backwards ) );
|
||||
if ( btn == this.fullMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fullMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == operationMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
|
||||
if ( btn == this.operationMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.operationMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,9 +36,9 @@ public class GuiInscriber extends AEBaseGui
|
||||
public GuiInscriber(InventoryPlayer inventoryPlayer, TileInscriber te)
|
||||
{
|
||||
super( new ContainerInscriber( inventoryPlayer, te ) );
|
||||
cvc = (ContainerInscriber) inventorySlots;
|
||||
this.cvc = (ContainerInscriber) this.inventorySlots;
|
||||
this.ySize = 176;
|
||||
this.xSize = hasToolbox() ? 246 : 211;
|
||||
this.xSize = this.hasToolbox() ? 246 : 211;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,32 +46,32 @@ public class GuiInscriber extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( this.pb );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/inscriber.png" );
|
||||
pb.xPosition = 135 + guiLeft;
|
||||
pb.yPosition = 39 + guiTop;
|
||||
this.bindTexture( "guis/inscriber.png" );
|
||||
this.pb.xPosition = 135 + this.guiLeft;
|
||||
this.pb.yPosition = 39 + this.guiTop;
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
|
||||
if ( drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + cvc.availableUpgrades() * 18 );
|
||||
if ( hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + ySize - 90, 178, ySize - 90, 68, 68 );
|
||||
if ( this.drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
||||
if ( this.hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.setFullMsg( cvc.getCurrentProgress() * 100 / cvc.getMaxProgress() + "%" );
|
||||
this.pb.setFullMsg( this.cvc.getCurrentProgress() * 100 / this.cvc.getMaxProgress() + "%" );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Inscriber.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Inscriber.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
protected boolean drawUpgrades()
|
||||
@@ -81,7 +81,7 @@ public class GuiInscriber extends AEBaseGui
|
||||
|
||||
protected boolean hasToolbox()
|
||||
{
|
||||
return ((ContainerUpgradeable) inventorySlots).hasToolbox();
|
||||
return ((ContainerUpgradeable) this.inventorySlots).hasToolbox();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,30 +55,30 @@ public class GuiInterface extends GuiUpgradeable
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == priority )
|
||||
if ( btn == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
|
||||
if ( btn == interfaceMode )
|
||||
if ( btn == this.interfaceMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
|
||||
|
||||
if ( btn == BlockMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( BlockMode.getSetting(), backwards ) );
|
||||
if ( btn == this.BlockMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender );
|
||||
buttonList.add( priority );
|
||||
this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender );
|
||||
this.buttonList.add( this.priority );
|
||||
|
||||
BlockMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.BLOCK, YesNo.NO );
|
||||
buttonList.add( BlockMode );
|
||||
this.BlockMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO );
|
||||
this.buttonList.add( this.BlockMode );
|
||||
|
||||
interfaceMode = new GuiToggleButton( this.guiLeft - 18, guiTop + 26, 84, 85, GuiText.InterfaceTerminal.getLocal(),
|
||||
this.interfaceMode = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 26, 84, 85, GuiText.InterfaceTerminal.getLocal(),
|
||||
GuiText.InterfaceTerminalHint.getLocal() );
|
||||
buttonList.add( interfaceMode );
|
||||
this.buttonList.add( this.interfaceMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,18 +90,18 @@ public class GuiInterface extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
if ( BlockMode != null )
|
||||
BlockMode.set( ((ContainerInterface) cvb).bMode );
|
||||
if ( this.BlockMode != null )
|
||||
this.BlockMode.set( ((ContainerInterface) this.cvb).bMode );
|
||||
|
||||
if ( interfaceMode != null )
|
||||
interfaceMode.setState( ((ContainerInterface) cvb).iTermMode == YesNo.YES );
|
||||
if ( this.interfaceMode != null )
|
||||
this.interfaceMode.setState( ((ContainerInterface) this.cvb).iTermMode == YesNo.YES );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( GuiText.Config.getLocal(), 18, 6 + 11 + 7, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.StoredItems.getLocal(), 18, 6 + 60 + 7, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.Config.getLocal(), 18, 6 + 11 + 7, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.StoredItems.getLocal(), 18, 6 + 60 + 7, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,24 +79,24 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
myScrollBar.setLeft( 175 );
|
||||
myScrollBar.setHeight( 106 );
|
||||
myScrollBar.setTop( 18 );
|
||||
this.myScrollBar.setLeft( 175 );
|
||||
this.myScrollBar.setHeight( 106 );
|
||||
this.myScrollBar.setTop( 18 );
|
||||
|
||||
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 104, offsetX ), this.guiTop + 4, 65, 12 );
|
||||
searchField.setEnableBackgroundDrawing( false );
|
||||
searchField.setMaxStringLength( 25 );
|
||||
searchField.setTextColor( 0xFFFFFF );
|
||||
searchField.setVisible( true );
|
||||
searchField.setFocused( true );
|
||||
this.searchField = new MEGuiTextField( this.fontRendererObj, this.guiLeft + Math.max( 104, this.offsetX ), this.guiTop + 4, 65, 12 );
|
||||
this.searchField.setEnableBackgroundDrawing( false );
|
||||
this.searchField.setMaxStringLength( 25 );
|
||||
this.searchField.setTextColor( 0xFFFFFF );
|
||||
this.searchField.setVisible( true );
|
||||
this.searchField.setFocused( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int xCoord, int yCoord, int btn)
|
||||
{
|
||||
searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
this.searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
|
||||
if ( btn == 1 && searchField.isMouseIn( xCoord, yCoord ) )
|
||||
if ( btn == 1 && this.searchField.isMouseIn( xCoord, yCoord ) )
|
||||
{
|
||||
this.searchField.setText( "" );
|
||||
this.refreshList();
|
||||
@@ -113,9 +113,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
if ( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
return;
|
||||
|
||||
if ( searchField.textboxKeyTyped( character, key ) )
|
||||
if ( this.searchField.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
refreshList();
|
||||
this.refreshList();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -127,15 +127,15 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/interfaceterminal.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/interfaceterminal.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
int offset = 17;
|
||||
int ex = myScrollBar.getCurrentScroll();
|
||||
int ex = this.myScrollBar.getCurrentScroll();
|
||||
|
||||
for (int x = 0; x < LINES_ON_PAGE && ex + x < lines.size(); x++)
|
||||
for (int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++)
|
||||
{
|
||||
Object lineObj = lines.get( ex + x );
|
||||
Object lineObj = this.lines.get( ex + x );
|
||||
if ( lineObj instanceof ClientDCInternalInv )
|
||||
{
|
||||
ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
@@ -147,48 +147,48 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
offset += 18;
|
||||
}
|
||||
|
||||
if ( searchField != null )
|
||||
searchField.drawTextBox();
|
||||
if ( this.searchField != null )
|
||||
this.searchField.drawTextBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.InterfaceTerminal.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
int offset = 17;
|
||||
int ex = myScrollBar.getCurrentScroll();
|
||||
int ex = this.myScrollBar.getCurrentScroll();
|
||||
|
||||
Iterator<Object> o = inventorySlots.inventorySlots.iterator();
|
||||
Iterator<Object> o = this.inventorySlots.inventorySlots.iterator();
|
||||
while (o.hasNext())
|
||||
{
|
||||
if ( o.next() instanceof SlotDisconnected )
|
||||
o.remove();
|
||||
}
|
||||
|
||||
for (int x = 0; x < LINES_ON_PAGE && ex + x < lines.size(); x++)
|
||||
for (int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++)
|
||||
{
|
||||
Object lineObj = lines.get( ex + x );
|
||||
Object lineObj = this.lines.get( ex + x );
|
||||
if ( lineObj instanceof ClientDCInternalInv )
|
||||
{
|
||||
ClientDCInternalInv inv = (ClientDCInternalInv) lineObj;
|
||||
for (int z = 0; z < inv.inv.getSizeInventory(); z++)
|
||||
{
|
||||
inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z, z * 18 + 8, 1 + offset ) );
|
||||
this.inventorySlots.inventorySlots.add( new SlotDisconnected( inv, z, z * 18 + 8, 1 + offset ) );
|
||||
}
|
||||
}
|
||||
else if ( lineObj instanceof String )
|
||||
{
|
||||
String name = (String) lineObj;
|
||||
int rows = byName.get( name ).size();
|
||||
int rows = this.byName.get( name ).size();
|
||||
if ( rows > 1 )
|
||||
name = name + " (" + rows + ')';
|
||||
|
||||
while (name.length() > 2 && fontRendererObj.getStringWidth( name ) > 155)
|
||||
while (name.length() > 2 && this.fontRendererObj.getStringWidth( name ) > 155)
|
||||
name = name.substring( 0, name.length() - 1 );
|
||||
|
||||
fontRendererObj.drawString( name, 10, 6 + offset, 4210752 );
|
||||
this.fontRendererObj.drawString( name, 10, 6 + offset, 4210752 );
|
||||
}
|
||||
offset += 18;
|
||||
}
|
||||
@@ -198,8 +198,8 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
if ( in.getBoolean( "clear" ) )
|
||||
{
|
||||
byId.clear();
|
||||
refreshList = true;
|
||||
this.byId.clear();
|
||||
this.refreshList = true;
|
||||
}
|
||||
|
||||
for (Object oKey : in.func_150296_c())
|
||||
@@ -211,7 +211,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
long id = Long.parseLong( key.substring( 1 ), Character.MAX_RADIX );
|
||||
NBTTagCompound invData = in.getCompoundTag( key );
|
||||
ClientDCInternalInv current = getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
||||
ClientDCInternalInv current = this.getById( id, invData.getLong( "sortBy" ), invData.getString( "un" ) );
|
||||
|
||||
for (int x = 0; x < current.inv.getSizeInventory(); x++)
|
||||
{
|
||||
@@ -226,12 +226,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
if ( refreshList )
|
||||
if ( this.refreshList )
|
||||
{
|
||||
refreshList = false;
|
||||
this.refreshList = false;
|
||||
// invalid caches on refresh
|
||||
cachedSearches.clear();
|
||||
refreshList();
|
||||
this.cachedSearches.clear();
|
||||
this.refreshList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,14 +242,14 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
*/
|
||||
private void refreshList()
|
||||
{
|
||||
byName.clear();
|
||||
this.byName.clear();
|
||||
|
||||
final String searchFilterLowerCase = searchField.getText().toLowerCase();
|
||||
final String searchFilterLowerCase = this.searchField.getText().toLowerCase();
|
||||
|
||||
final Set<Object> cachedSearch = this.getCacheForSearchTerm( searchFilterLowerCase );
|
||||
final boolean rebuild = cachedSearch.isEmpty();
|
||||
|
||||
for (ClientDCInternalInv entry : byId.values())
|
||||
for (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 ) )
|
||||
@@ -265,7 +265,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
for (ItemStack itemStack : entry.inv)
|
||||
{
|
||||
found = itemStackMatchesSearchTerm( itemStack, searchFilterLowerCase );
|
||||
found = this.itemStackMatchesSearchTerm( itemStack, searchFilterLowerCase );
|
||||
if ( found )
|
||||
{
|
||||
break;
|
||||
@@ -276,7 +276,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
// if found, filter skipped or machine name matching the search term, add it
|
||||
if ( found || entry.getName().toLowerCase().contains( searchFilterLowerCase ) )
|
||||
{
|
||||
byName.put( entry.getName(), entry );
|
||||
this.byName.put( entry.getName(), entry );
|
||||
cachedSearch.add( entry );
|
||||
}
|
||||
else
|
||||
@@ -285,26 +285,26 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
}
|
||||
|
||||
names.clear();
|
||||
names.addAll( byName.keySet() );
|
||||
this.names.clear();
|
||||
this.names.addAll( this.byName.keySet() );
|
||||
|
||||
Collections.sort( names );
|
||||
Collections.sort( this.names );
|
||||
|
||||
lines.clear();
|
||||
lines.ensureCapacity( getMaxRows() );
|
||||
this.lines.clear();
|
||||
this.lines.ensureCapacity( this.getMaxRows() );
|
||||
|
||||
for (String n : names)
|
||||
for (String n : this.names)
|
||||
{
|
||||
lines.add( n );
|
||||
this.lines.add( n );
|
||||
|
||||
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
|
||||
clientInventories.addAll( byName.get( n ) );
|
||||
clientInventories.addAll( this.byName.get( n ) );
|
||||
|
||||
Collections.sort( clientInventories );
|
||||
lines.addAll( clientInventories );
|
||||
this.lines.addAll( clientInventories );
|
||||
}
|
||||
|
||||
myScrollBar.setRange( 0, lines.size() - LINES_ON_PAGE, 2 );
|
||||
this.myScrollBar.setRange( 0, this.lines.size() - LINES_ON_PAGE, 2 );
|
||||
}
|
||||
|
||||
private boolean itemStackMatchesSearchTerm(ItemStack itemStack, String searchTerm)
|
||||
@@ -354,16 +354,16 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
*/
|
||||
private Set<Object> getCacheForSearchTerm(String searchTerm)
|
||||
{
|
||||
if ( !cachedSearches.containsKey( searchTerm ) )
|
||||
if ( !this.cachedSearches.containsKey( searchTerm ) )
|
||||
{
|
||||
cachedSearches.put( searchTerm, new HashSet<Object>() );
|
||||
this.cachedSearches.put( searchTerm, new HashSet<Object>() );
|
||||
}
|
||||
|
||||
Set<Object> cache = cachedSearches.get( searchTerm );
|
||||
Set<Object> cache = this.cachedSearches.get( searchTerm );
|
||||
|
||||
if ( cache.isEmpty() && searchTerm.length() > 1 )
|
||||
{
|
||||
cache.addAll( getCacheForSearchTerm( searchTerm.substring( 0, searchTerm.length() - 1 ) ) );
|
||||
cache.addAll( this.getCacheForSearchTerm( searchTerm.substring( 0, searchTerm.length() - 1 ) ) );
|
||||
return cache;
|
||||
}
|
||||
|
||||
@@ -377,17 +377,17 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
*/
|
||||
private int getMaxRows()
|
||||
{
|
||||
return names.size() + byId.size();
|
||||
return this.names.size() + this.byId.size();
|
||||
}
|
||||
|
||||
private ClientDCInternalInv getById(long id, long sortBy, String string)
|
||||
{
|
||||
ClientDCInternalInv o = byId.get( id );
|
||||
ClientDCInternalInv o = this.byId.get( id );
|
||||
|
||||
if ( o == null )
|
||||
{
|
||||
byId.put( id, o = new ClientDCInternalInv( 9, id, sortBy, string ) );
|
||||
refreshList = true;
|
||||
this.byId.put( id, o = new ClientDCInternalInv( 9, id, sortBy, string ) );
|
||||
this.refreshList = true;
|
||||
}
|
||||
|
||||
return o;
|
||||
|
||||
@@ -62,42 +62,42 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
level = new GuiNumberBox( fontRendererObj, this.guiLeft + 24, this.guiTop + 43, 79, fontRendererObj.FONT_HEIGHT, Long.class );
|
||||
level.setEnableBackgroundDrawing( false );
|
||||
level.setMaxStringLength( 16 );
|
||||
level.setTextColor( 0xFFFFFF );
|
||||
level.setVisible( true );
|
||||
level.setFocused( true );
|
||||
((ContainerLevelEmitter) inventorySlots).setTextField( level );
|
||||
this.level = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 24, this.guiTop + 43, 79, this.fontRendererObj.FONT_HEIGHT, Long.class );
|
||||
this.level.setEnableBackgroundDrawing( false );
|
||||
this.level.setMaxStringLength( 16 );
|
||||
this.level.setTextColor( 0xFFFFFF );
|
||||
this.level.setVisible( true );
|
||||
this.level.setFocused( true );
|
||||
((ContainerLevelEmitter) this.inventorySlots).setTextField( this.level );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
levelMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.LEVEL_TYPE, LevelType.ITEM_LEVEL );
|
||||
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL );
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 48, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
craftingMode = new GuiImgButton( this.guiLeft - 18, guiTop + 48, Settings.CRAFT_VIA_REDSTONE, YesNo.NO );
|
||||
this.levelMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.LEVEL_TYPE, LevelType.ITEM_LEVEL );
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL );
|
||||
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 );
|
||||
|
||||
buttonList.add( plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a ) );
|
||||
buttonList.add( plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b ) );
|
||||
buttonList.add( plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
|
||||
buttonList.add( plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
|
||||
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 ) );
|
||||
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c ) );
|
||||
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d ) );
|
||||
|
||||
buttonList.add( minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
|
||||
buttonList.add( minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
|
||||
buttonList.add( minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
|
||||
buttonList.add( minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
|
||||
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 59, 22, 20, "-" + a ) );
|
||||
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 59, 28, 20, "-" + b ) );
|
||||
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 59, 32, 20, "-" + c ) );
|
||||
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 59, 38, 20, "-" + d ) );
|
||||
|
||||
buttonList.add( levelMode );
|
||||
buttonList.add( redstoneMode );
|
||||
buttonList.add( fuzzyMode );
|
||||
buttonList.add( craftingMode );
|
||||
this.buttonList.add( this.levelMode );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.craftingMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,24 +107,24 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == craftingMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftingMode.getSetting(), backwards ) );
|
||||
if ( btn == this.craftingMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftingMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == levelMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( levelMode.getSetting(), backwards ) );
|
||||
if ( btn == this.levelMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.levelMode.getSetting(), backwards ) );
|
||||
|
||||
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
||||
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;
|
||||
|
||||
if ( isPlus || isMinus )
|
||||
addQty( getQty( btn ) );
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
|
||||
private void addQty(long i)
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = level.getText();
|
||||
String Out = this.level.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -134,7 +134,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
level.setText( Out );
|
||||
this.level.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -144,14 +144,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
if ( result < 0 )
|
||||
result = 0;
|
||||
|
||||
level.setText( Out = Long.toString( result ) );
|
||||
this.level.setText( Out = Long.toString( result ) );
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
// nope..
|
||||
level.setText( "0" );
|
||||
this.level.setText( "0" );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -162,8 +162,8 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
@Override
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
craftingMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
fuzzyMode.setVisibility( bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||
this.craftingMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -171,11 +171,11 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
{
|
||||
if ( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if ( (key == 211 || key == 205 || key == 203 || key == 14 || Character.isDigit( character )) && level.textboxKeyTyped( character, key ) )
|
||||
if ( (key == 211 || key == 205 || key == 203 || key == 14 || Character.isDigit( character )) && this.level.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = level.getText();
|
||||
String Out = this.level.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -185,7 +185,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
level.setText( Out );
|
||||
this.level.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -207,35 +207,35 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
boolean notCraftingMode = bc.getInstalledUpgrades( Upgrades.CRAFTING ) == 0;
|
||||
boolean notCraftingMode = this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) == 0;
|
||||
|
||||
// configure enabled status...
|
||||
level.setEnabled( notCraftingMode );
|
||||
plus1.enabled = notCraftingMode;
|
||||
plus10.enabled = notCraftingMode;
|
||||
plus100.enabled = notCraftingMode;
|
||||
plus1000.enabled = notCraftingMode;
|
||||
minus1.enabled = notCraftingMode;
|
||||
minus10.enabled = notCraftingMode;
|
||||
minus100.enabled = notCraftingMode;
|
||||
minus1000.enabled = notCraftingMode;
|
||||
levelMode.enabled = notCraftingMode;
|
||||
redstoneMode.enabled = notCraftingMode;
|
||||
this.level.setEnabled( notCraftingMode );
|
||||
this.plus1.enabled = notCraftingMode;
|
||||
this.plus10.enabled = notCraftingMode;
|
||||
this.plus100.enabled = notCraftingMode;
|
||||
this.plus1000.enabled = notCraftingMode;
|
||||
this.minus1.enabled = notCraftingMode;
|
||||
this.minus10.enabled = notCraftingMode;
|
||||
this.minus100.enabled = notCraftingMode;
|
||||
this.minus1000.enabled = notCraftingMode;
|
||||
this.levelMode.enabled = notCraftingMode;
|
||||
this.redstoneMode.enabled = notCraftingMode;
|
||||
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
|
||||
if ( craftingMode != null )
|
||||
craftingMode.set( ((ContainerLevelEmitter) cvb).cmType );
|
||||
if ( this.craftingMode != null )
|
||||
this.craftingMode.set( ((ContainerLevelEmitter) this.cvb).cmType );
|
||||
|
||||
if ( levelMode != null )
|
||||
levelMode.set( ((ContainerLevelEmitter) cvb).lvType );
|
||||
if ( this.levelMode != null )
|
||||
this.levelMode.set( ((ContainerLevelEmitter) this.cvb).lvType );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
level.drawTextBox();
|
||||
this.level.drawTextBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,30 +39,30 @@ public class GuiMAC extends GuiUpgradeable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( container, "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
this.pb = new GuiProgressBar( this.container, "guis/mac.png", 139, 36, 148, 201, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( this.pb );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.xPosition = 148 + guiLeft;
|
||||
pb.yPosition = 48 + guiTop;
|
||||
this.pb.xPosition = 148 + this.guiLeft;
|
||||
this.pb.yPosition = 48 + this.guiTop;
|
||||
super.drawBG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
pb.setFullMsg( container.getCurrentProgress() + "%" );
|
||||
this.pb.setFullMsg( this.container.getCurrentProgress() + "%" );
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
buttonList.add( redstoneMode );
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -110,47 +110,47 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
public GuiMEMonitorable(InventoryPlayer inventoryPlayer, ITerminalHost te, ContainerMEMonitorable c) {
|
||||
|
||||
super( c );
|
||||
myScrollBar = new GuiScrollbar();
|
||||
repo = new ItemRepo( myScrollBar, this );
|
||||
this.myScrollBar = new GuiScrollbar();
|
||||
this.repo = new ItemRepo( this.myScrollBar, this );
|
||||
|
||||
xSize = 185;
|
||||
ySize = 204;
|
||||
this.xSize = 185;
|
||||
this.ySize = 204;
|
||||
|
||||
if ( te instanceof IViewCellStorage )
|
||||
xSize += 33;
|
||||
this.xSize += 33;
|
||||
|
||||
standardSize = xSize;
|
||||
this.standardSize = this.xSize;
|
||||
|
||||
configSrc = ((IConfigurableObject) inventorySlots).getConfigManager();
|
||||
(monitorableContainer = (ContainerMEMonitorable) inventorySlots).gui = this;
|
||||
this.configSrc = ((IConfigurableObject) this.inventorySlots).getConfigManager();
|
||||
(this.monitorableContainer = (ContainerMEMonitorable) this.inventorySlots).gui = this;
|
||||
|
||||
viewCell = te instanceof IViewCellStorage;
|
||||
this.viewCell = te instanceof IViewCellStorage;
|
||||
|
||||
if ( te instanceof TileSecurity )
|
||||
myName = GuiText.Security;
|
||||
this.myName = GuiText.Security;
|
||||
else if ( te instanceof WirelessTerminalGuiObject )
|
||||
myName = GuiText.WirelessTerminal;
|
||||
this.myName = GuiText.WirelessTerminal;
|
||||
else if ( te instanceof IPortableCell )
|
||||
myName = GuiText.PortableCell;
|
||||
this.myName = GuiText.PortableCell;
|
||||
else if ( te instanceof IMEChest )
|
||||
myName = GuiText.Chest;
|
||||
this.myName = GuiText.Chest;
|
||||
else if ( te instanceof PartTerminal )
|
||||
myName = GuiText.Terminal;
|
||||
this.myName = GuiText.Terminal;
|
||||
}
|
||||
|
||||
public void postUpdate(List<IAEItemStack> list)
|
||||
{
|
||||
for (IAEItemStack is : list)
|
||||
repo.postUpdate( is );
|
||||
this.repo.postUpdate( is );
|
||||
|
||||
repo.updateView();
|
||||
setScrollBar();
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
myScrollBar.setTop( 18 ).setLeft( 175 ).setHeight( rows * 18 - 2 );
|
||||
myScrollBar.setRange( 0, (repo.size() + perRow - 1) / perRow - rows, Math.max( 1, rows / 6 ) );
|
||||
this.myScrollBar.setTop( 18 ).setLeft( 175 ).setHeight( this.rows * 18 - 2 );
|
||||
this.myScrollBar.setRange( 0, (this.repo.size() + this.perRow - 1) / this.perRow - this.rows, Math.max( 1, this.rows / 6 ) );
|
||||
}
|
||||
|
||||
public void re_init()
|
||||
@@ -163,14 +163,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
public void onGuiClosed()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
memoryText = searchField.getText();
|
||||
memoryText = this.searchField.getText();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
maxRows = getMaxRows();
|
||||
perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((width - standardSize) / 18);
|
||||
this.maxRows = this.getMaxRows();
|
||||
this.perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((this.width - this.standardSize) / 18);
|
||||
|
||||
boolean hasNEI = AppEng.instance.isIntegrationEnabled( IntegrationType.NEI );
|
||||
|
||||
@@ -178,106 +178,106 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
int top = hasNEI ? 22 : 0;
|
||||
|
||||
int magicNumber = 114 + 1;
|
||||
int extraSpace = height - magicNumber - NEI - top - reservedSpace;
|
||||
int extraSpace = this.height - magicNumber - NEI - top - this.reservedSpace;
|
||||
|
||||
rows = (int) Math.floor( extraSpace / 18 );
|
||||
if ( rows > maxRows )
|
||||
this.rows = (int) Math.floor( extraSpace / 18 );
|
||||
if ( this.rows > this.maxRows )
|
||||
{
|
||||
top += (rows - maxRows) * 18 / 2;
|
||||
rows = maxRows;
|
||||
top += (this.rows - this.maxRows) * 18 / 2;
|
||||
this.rows = this.maxRows;
|
||||
}
|
||||
|
||||
if ( hasNEI )
|
||||
rows--;
|
||||
this.rows--;
|
||||
|
||||
if ( rows < 3 )
|
||||
rows = 3;
|
||||
if ( this.rows < 3 )
|
||||
this.rows = 3;
|
||||
|
||||
meSlots.clear();
|
||||
for (int y = 0; y < rows; y++)
|
||||
this.meSlots.clear();
|
||||
for (int y = 0; y < this.rows; y++)
|
||||
{
|
||||
for (int x = 0; x < perRow; x++)
|
||||
for (int x = 0; x < this.perRow; x++)
|
||||
{
|
||||
meSlots.add( new InternalSlotME( repo, x + y * perRow, offsetX + x * 18, 18 + y * 18 ) );
|
||||
this.meSlots.add( new InternalSlotME( this.repo, x + y * this.perRow, this.offsetX + x * 18, 18 + y * 18 ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL )
|
||||
this.xSize = standardSize + ((perRow - 9) * 18);
|
||||
this.xSize = this.standardSize + ((this.perRow - 9) * 18);
|
||||
else
|
||||
this.xSize = standardSize;
|
||||
this.xSize = this.standardSize;
|
||||
|
||||
super.initGui();
|
||||
// full size : 204
|
||||
// extra slots : 72
|
||||
// slot 18
|
||||
|
||||
this.ySize = magicNumber + rows * 18 + reservedSpace;
|
||||
this.ySize = magicNumber + this.rows * 18 + this.reservedSpace;
|
||||
// this.guiTop = top;
|
||||
int unusedSpace = height - ySize;
|
||||
guiTop = (int) Math.floor( unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
|
||||
int unusedSpace = this.height - this.ySize;
|
||||
this.guiTop = (int) Math.floor( unusedSpace / (unusedSpace < 0 ? 3.8f : 2.0f) );
|
||||
|
||||
int offset = guiTop + 8;
|
||||
int offset = this.guiTop + 8;
|
||||
|
||||
if ( customSortOrder )
|
||||
if ( this.customSortOrder )
|
||||
{
|
||||
buttonList.add( SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
this.buttonList.add( this.SortByBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_BY, this.configSrc.getSetting( Settings.SORT_BY ) ) );
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
if ( viewCell || this instanceof GuiWirelessTerm )
|
||||
if ( this.viewCell || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
buttonList.add( ViewBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.VIEW_MODE, configSrc.getSetting( Settings.VIEW_MODE ) ) );
|
||||
this.buttonList.add( this.ViewBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.VIEW_MODE, this.configSrc.getSetting( Settings.VIEW_MODE ) ) );
|
||||
offset += 20;
|
||||
}
|
||||
|
||||
buttonList.add( SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, configSrc.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
this.buttonList.add( this.SortDirBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, this.configSrc.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
offset += 20;
|
||||
|
||||
buttonList.add( searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance.settings
|
||||
this.buttonList.add( this.searchBoxSettings = new GuiImgButton( this.guiLeft - 18, offset, Settings.SEARCH_MODE, AEConfig.instance.settings
|
||||
.getSetting( Settings.SEARCH_MODE ) ) );
|
||||
offset += 20;
|
||||
|
||||
if ( !(this instanceof GuiMEPortableCell) || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings
|
||||
this.buttonList.add( this.terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings
|
||||
.getSetting( Settings.TERMINAL_STYLE ) ) );
|
||||
}
|
||||
|
||||
searchField = new MEGuiTextField( fontRendererObj, this.guiLeft + Math.max( 80, offsetX ), this.guiTop + 4, 90, 12 );
|
||||
searchField.setEnableBackgroundDrawing( false );
|
||||
searchField.setMaxStringLength( 25 );
|
||||
searchField.setTextColor( 0xFFFFFF );
|
||||
searchField.setVisible( true );
|
||||
this.searchField = new MEGuiTextField( this.fontRendererObj, this.guiLeft + Math.max( 80, this.offsetX ), this.guiTop + 4, 90, 12 );
|
||||
this.searchField.setEnableBackgroundDrawing( false );
|
||||
this.searchField.setMaxStringLength( 25 );
|
||||
this.searchField.setTextColor( 0xFFFFFF );
|
||||
this.searchField.setVisible( true );
|
||||
|
||||
if ( viewCell || this instanceof GuiWirelessTerm )
|
||||
if ( this.viewCell || this instanceof GuiWirelessTerm )
|
||||
{
|
||||
buttonList.add( craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(),
|
||||
this.buttonList.add( this.craftingStatusBtn = new GuiTabButton( this.guiLeft + 170, this.guiTop - 4, 2 + 11 * 16, GuiText.CraftingStatus.getLocal(),
|
||||
itemRender ) );
|
||||
craftingStatusBtn.hideEdge = 13;
|
||||
this.craftingStatusBtn.hideEdge = 13;
|
||||
}
|
||||
|
||||
// Enum setting = AEConfig.instance.getSetting( "Terminal", SearchBoxMode.class, SearchBoxMode.AUTOSEARCH );
|
||||
Enum setting = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
||||
this.searchField.setFocused( SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting );
|
||||
|
||||
if ( isSubGui() )
|
||||
if ( this.isSubGui() )
|
||||
{
|
||||
searchField.setText( memoryText );
|
||||
repo.searchString = memoryText;
|
||||
repo.updateView();
|
||||
setScrollBar();
|
||||
this.searchField.setText( memoryText );
|
||||
this.repo.searchString = memoryText;
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
CraftingGridOffsetX = Integer.MAX_VALUE;
|
||||
CraftingGridOffsetY = Integer.MAX_VALUE;
|
||||
|
||||
for (Object s : inventorySlots.inventorySlots)
|
||||
for (Object s : this.inventorySlots.inventorySlots)
|
||||
{
|
||||
if ( s instanceof AppEngSlot )
|
||||
{
|
||||
if ( ((AppEngSlot) s).xDisplayPosition < 197 )
|
||||
repositionSlot( (AppEngSlot) s );
|
||||
this.repositionSlot( (AppEngSlot) s );
|
||||
}
|
||||
|
||||
if ( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
||||
@@ -297,13 +297,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
protected void repositionSlot(AppEngSlot s)
|
||||
{
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 5;
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton btn)
|
||||
{
|
||||
if ( btn == craftingStatusBtn )
|
||||
if ( btn == this.craftingStatusBtn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_CRAFTING_STATUS ) );
|
||||
}
|
||||
@@ -318,9 +318,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
Enum cv = iBtn.getCurrentValue();
|
||||
Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
||||
|
||||
if ( btn == terminalStyleBox )
|
||||
if ( btn == this.terminalStyleBox )
|
||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||
else if ( btn == searchBoxSettings )
|
||||
else if ( btn == this.searchBoxSettings )
|
||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||
else
|
||||
{
|
||||
@@ -337,7 +337,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
iBtn.set( next );
|
||||
|
||||
if ( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class )
|
||||
re_init();
|
||||
this.re_init();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,15 +349,15 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
|
||||
if ( searchMode != SearchBoxMode.AUTOSEARCH && searchMode != SearchBoxMode.NEI_AUTOSEARCH )
|
||||
{
|
||||
searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
this.searchField.mouseClicked( xCoord, yCoord, btn );
|
||||
}
|
||||
|
||||
if ( btn == 1 && searchField.isMouseIn( xCoord, yCoord ) )
|
||||
if ( btn == 1 && this.searchField.isMouseIn( xCoord, yCoord ) )
|
||||
{
|
||||
searchField.setText( "" );
|
||||
repo.searchString = "";
|
||||
repo.updateView();
|
||||
setScrollBar();
|
||||
this.searchField.setText( "" );
|
||||
this.repo.searchString = "";
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
super.mouseClicked( xCoord, yCoord, btn );
|
||||
@@ -371,11 +371,11 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if ( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
return;
|
||||
|
||||
if ( searchField.textboxKeyTyped( character, key ) )
|
||||
if ( this.searchField.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
repo.searchString = this.searchField.getText();
|
||||
repo.updateView();
|
||||
setScrollBar();
|
||||
this.repo.searchString = this.searchField.getText();
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -387,7 +387,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
@Override
|
||||
public void updateScreen()
|
||||
{
|
||||
repo.setPower( monitorableContainer.hasPower );
|
||||
this.repo.setPower( this.monitorableContainer.hasPower );
|
||||
super.updateScreen();
|
||||
}
|
||||
|
||||
@@ -396,36 +396,36 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
{
|
||||
int x_width = 197;
|
||||
|
||||
bindTexture( getBackground() );
|
||||
this.bindTexture( this.getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
|
||||
|
||||
if ( viewCell || (this instanceof GuiSecurity) )
|
||||
if ( this.viewCell || (this instanceof GuiSecurity) )
|
||||
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
|
||||
|
||||
for (int x = 0; x < rows; x++)
|
||||
for (int x = 0; x < this.rows; x++)
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
|
||||
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 16 + rows * 18 + lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + reservedSpace - lowerTextureOffset );
|
||||
this.drawTexturedModalRect( offsetX, offsetY + 16 + this.rows * 18 + this.lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + this.reservedSpace - this.lowerTextureOffset );
|
||||
|
||||
if ( viewCell )
|
||||
if ( this.viewCell )
|
||||
{
|
||||
boolean update = false;
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if ( myCurrentViewCells[i] != monitorableContainer.cellView[i].getStack() )
|
||||
if ( this.myCurrentViewCells[i] != this.monitorableContainer.cellView[i].getStack() )
|
||||
{
|
||||
update = true;
|
||||
myCurrentViewCells[i] = monitorableContainer.cellView[i].getStack();
|
||||
this.myCurrentViewCells[i] = this.monitorableContainer.cellView[i].getStack();
|
||||
}
|
||||
}
|
||||
|
||||
if ( update )
|
||||
repo.setViewCell( myCurrentViewCells );
|
||||
this.repo.setViewCell( this.myCurrentViewCells );
|
||||
}
|
||||
|
||||
if ( searchField != null )
|
||||
searchField.drawTextBox();
|
||||
if ( this.searchField != null )
|
||||
this.searchField.drawTextBox();
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -436,47 +436,47 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( myName.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( this.myName.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enum getSortBy()
|
||||
{
|
||||
return configSrc.getSetting( Settings.SORT_BY );
|
||||
return this.configSrc.getSetting( Settings.SORT_BY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enum getSortDir()
|
||||
{
|
||||
return configSrc.getSetting( Settings.SORT_DIRECTION );
|
||||
return this.configSrc.getSetting( Settings.SORT_DIRECTION );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enum getSortDisplay()
|
||||
{
|
||||
return configSrc.getSetting( Settings.VIEW_MODE );
|
||||
return this.configSrc.getSetting( Settings.VIEW_MODE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
|
||||
{
|
||||
if ( SortByBox != null )
|
||||
SortByBox.set( configSrc.getSetting( Settings.SORT_BY ) );
|
||||
if ( this.SortByBox != null )
|
||||
this.SortByBox.set( this.configSrc.getSetting( Settings.SORT_BY ) );
|
||||
|
||||
if ( SortDirBox != null )
|
||||
SortDirBox.set( configSrc.getSetting( Settings.SORT_DIRECTION ) );
|
||||
if ( this.SortDirBox != null )
|
||||
this.SortDirBox.set( this.configSrc.getSetting( Settings.SORT_DIRECTION ) );
|
||||
|
||||
if ( ViewBox != null )
|
||||
ViewBox.set( configSrc.getSetting( Settings.VIEW_MODE ) );
|
||||
if ( this.ViewBox != null )
|
||||
this.ViewBox.set( this.configSrc.getSetting( Settings.VIEW_MODE ) );
|
||||
|
||||
repo.updateView();
|
||||
this.repo.updateView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPowered()
|
||||
{
|
||||
return repo.hasPower();
|
||||
return this.repo.hasPower();
|
||||
}
|
||||
|
||||
int getMaxRows()
|
||||
|
||||
@@ -58,9 +58,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
super( new ContainerNetworkStatus( inventoryPlayer, te ) );
|
||||
this.ySize = 153;
|
||||
this.xSize = 195;
|
||||
myScrollBar = new GuiScrollbar();
|
||||
repo = new ItemRepo( myScrollBar, this );
|
||||
repo.rowSize = 5;
|
||||
this.myScrollBar = new GuiScrollbar();
|
||||
this.repo = new ItemRepo( this.myScrollBar, this );
|
||||
this.repo.rowSize = 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,10 +70,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == units )
|
||||
if ( btn == this.units )
|
||||
{
|
||||
AEConfig.instance.nextPowerUnit( backwards );
|
||||
units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
this.units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,33 +82,33 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
units = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
buttonList.add( units );
|
||||
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
this.buttonList.add( this.units );
|
||||
}
|
||||
|
||||
public void postUpdate(List<IAEItemStack> list)
|
||||
{
|
||||
repo.clear();
|
||||
this.repo.clear();
|
||||
|
||||
for (IAEItemStack is : list)
|
||||
repo.postUpdate( is );
|
||||
this.repo.postUpdate( is );
|
||||
|
||||
repo.updateView();
|
||||
setScrollBar();
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
}
|
||||
|
||||
private void setScrollBar()
|
||||
{
|
||||
int size = repo.size();
|
||||
myScrollBar.setTop( 39 ).setLeft( 175 ).setHeight( 78 );
|
||||
myScrollBar.setRange( 0, (size + 4) / 5 - rows, 1 );
|
||||
int size = this.repo.size();
|
||||
this.myScrollBar.setTop( 39 ).setLeft( 175 ).setHeight( 78 );
|
||||
this.myScrollBar.setRange( 0, (size + 4) / 5 - this.rows, 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/networkstatus.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/networkstatus.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
int tooltip = -1;
|
||||
@@ -119,10 +119,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
int gx = (width - xSize) / 2;
|
||||
int gy = (height - ySize) / 2;
|
||||
int gx = (this.width - this.xSize) / 2;
|
||||
int gy = (this.height - this.ySize) / 2;
|
||||
|
||||
tooltip = -1;
|
||||
this.tooltip = -1;
|
||||
|
||||
for (int z = 0; z <= 4 * 5; z++)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
{
|
||||
if ( minY < mouse_y && minY + 20 > mouse_y )
|
||||
{
|
||||
tooltip = z;
|
||||
this.tooltip = z;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -154,15 +154,15 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
ContainerNetworkStatus ns = (ContainerNetworkStatus) inventorySlots;
|
||||
ContainerNetworkStatus ns = (ContainerNetworkStatus) this.inventorySlots;
|
||||
|
||||
fontRendererObj.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.currentPower, false ), 13, 16, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.maxPower, false ), 13, 26, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( ns.currentPower, false ), 13, 16, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( ns.maxPower, false ), 13, 26, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( GuiText.PowerInputRate.getLocal() + ": " + Platform.formatPowerLong( ns.avgAddition, true ), 13, 143 - 10, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.PowerUsageRate.getLocal() + ": " + Platform.formatPowerLong( ns.powerUsage, true ), 13, 143 - 20, 4210752 );
|
||||
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;
|
||||
|
||||
@@ -177,9 +177,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
int toolPosX = 0;
|
||||
int toolPosY = 0;
|
||||
|
||||
for (int z = viewStart; z < Math.min( viewEnd, repo.size() ); z++)
|
||||
for (int z = viewStart; z < Math.min( viewEnd, this.repo.size() ); z++)
|
||||
{
|
||||
IAEItemStack refStack = repo.getReferenceItem( z );
|
||||
IAEItemStack refStack = this.repo.getReferenceItem( z );
|
||||
if ( refStack != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
@@ -189,17 +189,17 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
if ( refStack.getStackSize() >= 10000 )
|
||||
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
|
||||
|
||||
int w = fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - (w * 0.5)) * 2), (y * 18 + yo + 6) * 2,
|
||||
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;
|
||||
|
||||
if ( tooltip == z - viewStart )
|
||||
if ( this.tooltip == z - viewStart )
|
||||
{
|
||||
ToolTip = Platform.getItemDisplayName( repo.getItem( z ) );
|
||||
ToolTip = Platform.getItemDisplayName( this.repo.getItem( z ) );
|
||||
|
||||
ToolTip = ToolTip + ( '\n' + GuiText.Installed.getLocal() + ": " + (refStack.getStackSize()));
|
||||
if ( refStack.getCountRequestable() > 0 )
|
||||
@@ -209,7 +209,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
toolPosY = y * 18 + yo;
|
||||
}
|
||||
|
||||
drawItem( posX, posY, repo.getItem( z ) );
|
||||
this.drawItem( posX, posY, this.repo.getItem( z ) );
|
||||
|
||||
x++;
|
||||
|
||||
@@ -222,10 +222,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
}
|
||||
|
||||
if ( tooltip >= 0 && ToolTip.length() > 0 )
|
||||
if ( this.tooltip >= 0 && ToolTip.length() > 0 )
|
||||
{
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
drawTooltip( toolPosX, toolPosY + 10, 0, ToolTip );
|
||||
this.drawTooltip( toolPosX, toolPosY + 10, 0, ToolTip );
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
{
|
||||
if ( stack != null )
|
||||
{
|
||||
Slot s = getSlot( mouseX, mouseY );
|
||||
Slot s = this.getSlot( mouseX, mouseY );
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
IAEItemStack myStack = null;
|
||||
@@ -264,7 +264,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
// Vanilla version...
|
||||
protected void drawItemStackTooltip(ItemStack stack, int x, int y)
|
||||
{
|
||||
Slot s = getSlot( x, y );
|
||||
Slot s = this.getSlot( x, y );
|
||||
if ( s instanceof SlotME && stack != null )
|
||||
{
|
||||
IAEItemStack myStack = null;
|
||||
@@ -288,7 +288,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
currentToolTip.add( GuiText.Installed.getLocal() + ": " + (myStack.getStackSize()) );
|
||||
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||
|
||||
drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
this.drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
}
|
||||
}
|
||||
// super.drawItemStackTooltip( stack, x, y );
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
|
||||
try
|
||||
{
|
||||
if ( btn == tFacades )
|
||||
if ( btn == this.tFacades )
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "NetworkTool", "Toggle" ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
@@ -62,26 +62,26 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
tFacades = new GuiToggleButton( this.guiLeft - 18, guiTop + 8, 23, 22, GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint.getLocal() );
|
||||
this.tFacades = new GuiToggleButton( this.guiLeft - 18, this.guiTop + 8, 23, 22, GuiText.TransparentFacades.getLocal(), GuiText.TransparentFacadesHint.getLocal() );
|
||||
|
||||
buttonList.add( tFacades );
|
||||
this.buttonList.add( this.tFacades );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/toolbox.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/toolbox.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
if ( tFacades != null )
|
||||
tFacades.setState( ((ContainerNetworkTool) inventorySlots).facadeMode );
|
||||
if ( this.tFacades != null )
|
||||
this.tFacades.setState( ((ContainerNetworkTool) this.inventorySlots).facadeMode );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,19 +50,19 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
buttonList.add( tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ),
|
||||
this.buttonList.add( this.tabCraftButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.crafting_table ),
|
||||
GuiText.CraftingPattern.getLocal(), itemRender ) );
|
||||
buttonList.add( tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ),
|
||||
this.buttonList.add( this.tabProcessButton = new GuiTabButton( this.guiLeft + 173, this.guiTop + this.ySize - 177, new ItemStack( Blocks.furnace ),
|
||||
GuiText.ProcessingPattern.getLocal(), itemRender ) );
|
||||
|
||||
// buttonList.add( substitutionsBtn = new GuiImgButton( this.guiLeft + 84, this.guiTop + this.ySize - 163,
|
||||
// Settings.ACTIONS, ActionItems.SUBSTITUTION ) );
|
||||
// substitutionsBtn.halfSize = true;
|
||||
|
||||
buttonList.add( clearBtn = new GuiImgButton( this.guiLeft + 74, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE ) );
|
||||
clearBtn.halfSize = true;
|
||||
this.buttonList.add( this.clearBtn = new GuiImgButton( this.guiLeft + 74, this.guiTop + this.ySize - 163, Settings.ACTIONS, ActionItems.CLOSE ) );
|
||||
this.clearBtn.halfSize = true;
|
||||
|
||||
buttonList.add( encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 142, Settings.ACTIONS, ActionItems.ENCODE ) );
|
||||
this.buttonList.add( this.encodeBtn = new GuiImgButton( this.guiLeft + 147, this.guiTop + this.ySize - 142, Settings.ACTIONS, ActionItems.ENCODE ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,17 +73,17 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
try
|
||||
{
|
||||
|
||||
if ( tabCraftButton == btn || tabProcessButton == btn )
|
||||
if ( this.tabCraftButton == btn || this.tabProcessButton == btn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PatternTerminal.CraftMode", tabProcessButton == btn ? "1" : "0" ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PatternTerminal.CraftMode", this.tabProcessButton == btn ? "1" : "0" ) );
|
||||
}
|
||||
|
||||
if ( encodeBtn == btn )
|
||||
if ( this.encodeBtn == btn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PatternTerminal.Encode", "1" ) );
|
||||
}
|
||||
|
||||
if ( clearBtn == btn )
|
||||
if ( this.clearBtn == btn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PatternTerminal.Clear", "1" ) );
|
||||
}
|
||||
@@ -105,21 +105,21 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
protected void repositionSlot(AppEngSlot s)
|
||||
{
|
||||
if ( s.isPlayerSide() )
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 5;
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
||||
else
|
||||
s.yDisplayPosition = s.defY + ySize - 78 - 3;
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 3;
|
||||
}
|
||||
|
||||
public GuiPatternTerm(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( inventoryPlayer, te, new ContainerPatternTerm( inventoryPlayer, te ) );
|
||||
container = (ContainerPatternTerm) this.inventorySlots;
|
||||
reservedSpace = 81;
|
||||
this.container = (ContainerPatternTerm) this.inventorySlots;
|
||||
this.reservedSpace = 81;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
if ( container.craftingMode )
|
||||
if ( this.container.craftingMode )
|
||||
return "guis/pattern.png";
|
||||
return "guis/pattern2.png";
|
||||
}
|
||||
@@ -127,19 +127,19 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
if ( !container.craftingMode )
|
||||
if ( !this.container.craftingMode )
|
||||
{
|
||||
tabCraftButton.visible = false;
|
||||
tabProcessButton.visible = true;
|
||||
this.tabCraftButton.visible = false;
|
||||
this.tabProcessButton.visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
tabCraftButton.visible = true;
|
||||
tabProcessButton.visible = false;
|
||||
this.tabCraftButton.visible = true;
|
||||
this.tabProcessButton.visible = false;
|
||||
}
|
||||
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
fontRendererObj.drawString( GuiText.PatternTerminal.getLocal(), 8, ySize - 96 + 2 - reservedSpace, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.PatternTerminal.getLocal(), 8, this.ySize - 96 + 2 - this.reservedSpace, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,65 +69,65 @@ public class GuiPriority extends AEBaseGui
|
||||
int c = AEConfig.instance.priorityByStacksAmounts( 2 );
|
||||
int d = AEConfig.instance.priorityByStacksAmounts( 3 );
|
||||
|
||||
buttonList.add( plus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 32, 22, 20, "+" + a ) );
|
||||
buttonList.add( plus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 32, 28, 20, "+" + b ) );
|
||||
buttonList.add( plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 32, 32, 20, "+" + c ) );
|
||||
buttonList.add( plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 32, 38, 20, "+" + d ) );
|
||||
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 ) );
|
||||
this.buttonList.add( this.plus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 32, 32, 20, "+" + c ) );
|
||||
this.buttonList.add( this.plus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 32, 38, 20, "+" + d ) );
|
||||
|
||||
buttonList.add( minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 69, 22, 20, "-" + a ) );
|
||||
buttonList.add( minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 69, 28, 20, "-" + b ) );
|
||||
buttonList.add( minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 69, 32, 20, "-" + c ) );
|
||||
buttonList.add( minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 69, 38, 20, "-" + d ) );
|
||||
this.buttonList.add( this.minus1 = new GuiButton( 0, this.guiLeft + 20, this.guiTop + 69, 22, 20, "-" + a ) );
|
||||
this.buttonList.add( this.minus10 = new GuiButton( 0, this.guiLeft + 48, this.guiTop + 69, 28, 20, "-" + b ) );
|
||||
this.buttonList.add( this.minus100 = new GuiButton( 0, this.guiLeft + 82, this.guiTop + 69, 32, 20, "-" + c ) );
|
||||
this.buttonList.add( this.minus1000 = new GuiButton( 0, this.guiLeft + 120, this.guiTop + 69, 38, 20, "-" + d ) );
|
||||
|
||||
ItemStack myIcon = null;
|
||||
Object target = ((AEBaseContainer) inventorySlots).getTarget();
|
||||
Object target = ((AEBaseContainer) this.inventorySlots).getTarget();
|
||||
|
||||
if ( target instanceof PartStorageBus )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partStorageBus.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_STORAGEBUS;
|
||||
this.OriginalGui = GuiBridge.GUI_STORAGEBUS;
|
||||
}
|
||||
|
||||
if ( target instanceof PartFormationPlane )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partFormationPlane.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_FORMATION_PLANE;
|
||||
this.OriginalGui = GuiBridge.GUI_FORMATION_PLANE;
|
||||
}
|
||||
|
||||
if ( target instanceof TileDrive )
|
||||
{
|
||||
myIcon = AEApi.instance().blocks().blockDrive.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_DRIVE;
|
||||
this.OriginalGui = GuiBridge.GUI_DRIVE;
|
||||
}
|
||||
|
||||
if ( target instanceof TileChest )
|
||||
{
|
||||
myIcon = AEApi.instance().blocks().blockChest.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_CHEST;
|
||||
this.OriginalGui = GuiBridge.GUI_CHEST;
|
||||
}
|
||||
|
||||
if ( target instanceof TileInterface )
|
||||
{
|
||||
myIcon = AEApi.instance().blocks().blockInterface.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_INTERFACE;
|
||||
this.OriginalGui = GuiBridge.GUI_INTERFACE;
|
||||
}
|
||||
|
||||
if ( target instanceof PartInterface )
|
||||
{
|
||||
myIcon = AEApi.instance().parts().partInterface.stack( 1 );
|
||||
OriginalGui = GuiBridge.GUI_INTERFACE;
|
||||
this.OriginalGui = GuiBridge.GUI_INTERFACE;
|
||||
}
|
||||
|
||||
if ( OriginalGui != null )
|
||||
buttonList.add( originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
if ( this.OriginalGui != null )
|
||||
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
|
||||
priority = new GuiNumberBox( fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, fontRendererObj.FONT_HEIGHT, Long.class );
|
||||
priority.setEnableBackgroundDrawing( false );
|
||||
priority.setMaxStringLength( 16 );
|
||||
priority.setTextColor( 0xFFFFFF );
|
||||
priority.setVisible( true );
|
||||
priority.setFocused( true );
|
||||
((ContainerPriority) inventorySlots).setTextField( priority );
|
||||
this.priority = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Long.class );
|
||||
this.priority.setEnableBackgroundDrawing( false );
|
||||
this.priority.setMaxStringLength( 16 );
|
||||
this.priority.setTextColor( 0xFFFFFF );
|
||||
this.priority.setVisible( true );
|
||||
this.priority.setFocused( true );
|
||||
((ContainerPriority) this.inventorySlots).setTextField( this.priority );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,23 +135,23 @@ public class GuiPriority extends AEBaseGui
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
|
||||
if ( btn == originalGuiBtn )
|
||||
if ( btn == this.originalGuiBtn )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( this.OriginalGui ) );
|
||||
}
|
||||
|
||||
boolean isPlus = btn == plus1 || btn == plus10 || btn == plus100 || btn == plus1000;
|
||||
boolean isMinus = btn == minus1 || btn == minus10 || btn == minus100 || btn == minus1000;
|
||||
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;
|
||||
|
||||
if ( isPlus || isMinus )
|
||||
addQty( getQty( btn ) );
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
|
||||
private void addQty(int i)
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = priority.getText();
|
||||
String Out = this.priority.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -161,7 +161,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
priority.setText( Out );
|
||||
this.priority.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -169,14 +169,14 @@ public class GuiPriority extends AEBaseGui
|
||||
long result = Long.parseLong( Out );
|
||||
result += i;
|
||||
|
||||
priority.setText( Out = Long.toString( result ) );
|
||||
this.priority.setText( Out = Long.toString( result ) );
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", Out ) );
|
||||
}
|
||||
catch(NumberFormatException e )
|
||||
{
|
||||
// nope..
|
||||
priority.setText( "0" );
|
||||
this.priority.setText( "0" );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -190,11 +190,11 @@ public class GuiPriority extends AEBaseGui
|
||||
if ( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if ( (key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ))
|
||||
&& priority.textboxKeyTyped( character, key ) )
|
||||
&& this.priority.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = priority.getText();
|
||||
String Out = this.priority.getText();
|
||||
|
||||
boolean Fixed = false;
|
||||
while (Out.startsWith( "0" ) && Out.length() > 1)
|
||||
@@ -204,7 +204,7 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if ( Fixed )
|
||||
priority.setText( Out );
|
||||
this.priority.setText( Out );
|
||||
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
@@ -226,10 +226,10 @@ public class GuiPriority extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/priority.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/priority.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
|
||||
priority.drawTextBox();
|
||||
this.priority.drawTextBox();
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -240,6 +240,6 @@ public class GuiPriority extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,15 +35,15 @@ public class GuiQNB extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/chest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.QuantumLinkChamber.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.QuantumLinkChamber.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -45,31 +45,31 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
name = new GuiTextField( fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, fontRendererObj.FONT_HEIGHT );
|
||||
name.setEnableBackgroundDrawing( false );
|
||||
name.setMaxStringLength( 32 );
|
||||
name.setTextColor( 0xFFFFFF );
|
||||
name.setVisible( true );
|
||||
name.setFocused( true );
|
||||
this.name = new GuiTextField( this.fontRendererObj, this.guiLeft + 24, this.guiTop + 32, 79, this.fontRendererObj.FONT_HEIGHT );
|
||||
this.name.setEnableBackgroundDrawing( false );
|
||||
this.name.setMaxStringLength( 32 );
|
||||
this.name.setTextColor( 0xFFFFFF );
|
||||
this.name.setVisible( true );
|
||||
this.name.setFocused( true );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/quartzknife.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
name.drawTextBox();
|
||||
this.bindTexture( "guis/quartzknife.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
this.name.drawTextBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char character, int key)
|
||||
{
|
||||
if ( name.textboxKeyTyped( character, key ) )
|
||||
if ( this.name.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
String Out = name.getText();
|
||||
((ContainerQuartzKnife) inventorySlots).setName( Out );
|
||||
String Out = this.name.getText();
|
||||
((ContainerQuartzKnife) this.inventorySlots).setName( Out );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "QuartzKnife.Name", Out ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
@@ -86,8 +86,8 @@ public class GuiQuartzKnife extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.QuartzCuttingKnife.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.QuartzCuttingKnife.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
|
||||
public GuiSecurity(InventoryPlayer inventoryPlayer, ITerminalHost te) {
|
||||
super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) );
|
||||
customSortOrder = false;
|
||||
reservedSpace = 33;
|
||||
this.customSortOrder = false;
|
||||
this.reservedSpace = 33;
|
||||
|
||||
// increase size so that the slot is over the gui.
|
||||
xSize += 56;
|
||||
standardSize = xSize;
|
||||
this.xSize += 56;
|
||||
this.standardSize = this.xSize;
|
||||
}
|
||||
|
||||
GuiToggleButton inject, extract, craft, build, security;
|
||||
@@ -54,19 +54,19 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
super.initGui();
|
||||
|
||||
int top = this.guiTop + this.ySize - 116;
|
||||
buttonList.add( inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT
|
||||
this.buttonList.add( this.inject = new GuiToggleButton( this.guiLeft + 56, top, 11 * 16, 12 * 16, SecurityPermissions.INJECT
|
||||
.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
|
||||
buttonList.add( extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT
|
||||
this.buttonList.add( this.extract = new GuiToggleButton( this.guiLeft + 56 + 18, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT
|
||||
.getUnlocalizedName(), SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
|
||||
|
||||
buttonList.add( craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT.getUnlocalizedName(),
|
||||
this.buttonList.add( this.craft = new GuiToggleButton( this.guiLeft + 56 + 18 * 2, top, 11 * 16 + 2, 12 * 16 + 2, SecurityPermissions.CRAFT.getUnlocalizedName(),
|
||||
SecurityPermissions.CRAFT.getUnlocalizedTip() ) );
|
||||
|
||||
buttonList.add( build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD.getUnlocalizedName(),
|
||||
this.buttonList.add( this.build = new GuiToggleButton( this.guiLeft + 56 + 18 * 3, top, 11 * 16 + 3, 12 * 16 + 3, SecurityPermissions.BUILD.getUnlocalizedName(),
|
||||
SecurityPermissions.BUILD.getUnlocalizedTip() ) );
|
||||
|
||||
buttonList.add( security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
|
||||
this.buttonList.add( this.security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
|
||||
.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
}
|
||||
|
||||
@@ -77,15 +77,15 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
|
||||
SecurityPermissions toggleSetting = null;
|
||||
|
||||
if ( btn == inject )
|
||||
if ( btn == this.inject )
|
||||
toggleSetting = SecurityPermissions.INJECT;
|
||||
if ( btn == extract )
|
||||
if ( btn == this.extract )
|
||||
toggleSetting = SecurityPermissions.EXTRACT;
|
||||
if ( btn == craft )
|
||||
if ( btn == this.craft )
|
||||
toggleSetting = SecurityPermissions.CRAFT;
|
||||
if ( btn == build )
|
||||
if ( btn == this.build )
|
||||
toggleSetting = SecurityPermissions.BUILD;
|
||||
if ( btn == security )
|
||||
if ( btn == this.security )
|
||||
toggleSetting = SecurityPermissions.SECURITY;
|
||||
|
||||
if ( toggleSetting != null )
|
||||
@@ -105,13 +105,13 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
@Override
|
||||
protected String getBackground()
|
||||
{
|
||||
ContainerSecurity cs = (ContainerSecurity) inventorySlots;
|
||||
ContainerSecurity cs = (ContainerSecurity) this.inventorySlots;
|
||||
|
||||
inject.setState( (cs.security & (1 << SecurityPermissions.INJECT.ordinal())) > 0 );
|
||||
extract.setState( (cs.security & (1 << SecurityPermissions.EXTRACT.ordinal())) > 0 );
|
||||
craft.setState( (cs.security & (1 << SecurityPermissions.CRAFT.ordinal())) > 0 );
|
||||
build.setState( (cs.security & (1 << SecurityPermissions.BUILD.ordinal())) > 0 );
|
||||
security.setState( (cs.security & (1 << SecurityPermissions.SECURITY.ordinal())) > 0 );
|
||||
this.inject.setState( (cs.security & (1 << SecurityPermissions.INJECT.ordinal())) > 0 );
|
||||
this.extract.setState( (cs.security & (1 << SecurityPermissions.EXTRACT.ordinal())) > 0 );
|
||||
this.craft.setState( (cs.security & (1 << SecurityPermissions.CRAFT.ordinal())) > 0 );
|
||||
this.build.setState( (cs.security & (1 << SecurityPermissions.BUILD.ordinal())) > 0 );
|
||||
this.security.setState( (cs.security & (1 << SecurityPermissions.SECURITY.ordinal())) > 0 );
|
||||
|
||||
return "guis/security.png";
|
||||
}
|
||||
@@ -120,7 +120,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, this.ySize - 96 + 1 - this.reservedSpace, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,15 +37,15 @@ public class GuiSkyChest extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/skychest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/skychest.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.SkyChest.getLocal() ), 8, 8, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 2, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.SkyChest.getLocal() ), 8, 8, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 2, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
public GuiSpatialIOPort(InventoryPlayer inventoryPlayer, TileSpatialIOPort te) {
|
||||
super( new ContainerSpatialIOPort( inventoryPlayer, te ) );
|
||||
this.ySize = 199;
|
||||
container = (ContainerSpatialIOPort) inventorySlots;
|
||||
this.container = (ContainerSpatialIOPort) this.inventorySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,10 +52,10 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == units )
|
||||
if ( btn == this.units )
|
||||
{
|
||||
AEConfig.instance.nextPowerUnit( backwards );
|
||||
units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
this.units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,27 +64,27 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
units = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
buttonList.add( units );
|
||||
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
this.buttonList.add( this.units );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/spatialio.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/spatialio.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( GuiText.StoredPower.getLocal() + ": " + Platform.formatPowerLong( container.currentPower, false ), 13, 21, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.MaxPower.getLocal() + ": " + Platform.formatPowerLong( container.maxPower, false ), 13, 31, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( container.reqPower, false ), 13, 78, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) container.eff) / 100) + '%', 13, 88, 4210752 );
|
||||
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 );
|
||||
this.fontRendererObj.drawString( GuiText.RequiredPower.getLocal() + ": " + Platform.formatPowerLong( this.container.reqPower, false ), 13, 78, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.Efficiency.getLocal() + ": " + (((float) this.container.eff) / 100) + '%', 13, 88, 4210752 );
|
||||
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.SpatialIOPort.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -59,35 +59,35 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.StorageBus.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.StorageBus.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( fuzzyMode != null )
|
||||
fuzzyMode.set( cvb.fzMode );
|
||||
if ( this.fuzzyMode != null )
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
|
||||
if ( storageFilter != null )
|
||||
storageFilter.set( ((ContainerStorageBus) cvb).storageFilter );
|
||||
if ( this.storageFilter != null )
|
||||
this.storageFilter.set( ((ContainerStorageBus) this.cvb).storageFilter );
|
||||
|
||||
if ( rwMode != null )
|
||||
rwMode.set( ((ContainerStorageBus) cvb).rwMode );
|
||||
if ( this.rwMode != null )
|
||||
this.rwMode.set( ((ContainerStorageBus) this.cvb).rwMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons()
|
||||
{
|
||||
clear = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
|
||||
partition = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
|
||||
rwMode = new GuiImgButton( this.guiLeft - 18, guiTop + 48, Settings.ACCESS, AccessRestriction.READ_WRITE );
|
||||
storageFilter = new GuiImgButton( this.guiLeft - 18, guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.clear = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.ACTIONS, ActionItems.CLOSE );
|
||||
this.partition = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.ACTIONS, ActionItems.WRENCH );
|
||||
this.rwMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.ACCESS, AccessRestriction.READ_WRITE );
|
||||
this.storageFilter = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.STORAGE_FILTER, StorageFilter.EXTRACTABLE_ONLY );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
this.buttonList.add( this.priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
|
||||
buttonList.add( storageFilter );
|
||||
buttonList.add( fuzzyMode );
|
||||
buttonList.add( rwMode );
|
||||
buttonList.add( partition );
|
||||
buttonList.add( clear );
|
||||
this.buttonList.add( this.storageFilter );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.rwMode );
|
||||
this.buttonList.add( this.partition );
|
||||
this.buttonList.add( this.clear );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -99,20 +99,20 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
|
||||
try
|
||||
{
|
||||
if ( btn == partition )
|
||||
if ( btn == this.partition )
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Partition" ) );
|
||||
|
||||
else if ( btn == clear )
|
||||
else if ( btn == this.clear )
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Clear" ) );
|
||||
|
||||
else if ( btn == priority )
|
||||
else if ( btn == this.priority )
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
|
||||
else if ( btn == rwMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
|
||||
else if ( btn == this.rwMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.rwMode.getSetting(), backwards ) );
|
||||
|
||||
else if ( btn == storageFilter )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( storageFilter.getSetting(), backwards ) );
|
||||
else if ( btn == this.storageFilter )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.storageFilter.getSetting(), backwards ) );
|
||||
|
||||
}
|
||||
catch (IOException e)
|
||||
|
||||
@@ -53,10 +53,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
|
||||
public GuiUpgradeable(ContainerUpgradeable te) {
|
||||
super( te );
|
||||
cvb = te;
|
||||
this.cvb = te;
|
||||
|
||||
bc = (IUpgradeableHost) te.getTarget();
|
||||
this.xSize = hasToolbox() ? 246 : 211;
|
||||
this.bc = (IUpgradeableHost) te.getTarget();
|
||||
this.xSize = this.hasToolbox() ? 246 : 211;
|
||||
this.ySize = 184;
|
||||
}
|
||||
|
||||
@@ -64,18 +64,18 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
public void initGui()
|
||||
{
|
||||
super.initGui();
|
||||
addButtons();
|
||||
this.addButtons();
|
||||
}
|
||||
|
||||
protected void addButtons()
|
||||
{
|
||||
redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
craftMode = new GuiImgButton( this.guiLeft - 18, guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
||||
|
||||
buttonList.add( craftMode );
|
||||
buttonList.add( redstoneMode );
|
||||
buttonList.add( fuzzyMode );
|
||||
this.buttonList.add( this.craftMode );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -85,32 +85,32 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == redstoneMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( redstoneMode.getSetting(), backwards ) );
|
||||
if ( btn == this.redstoneMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.redstoneMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == craftMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( craftMode.getSetting(), backwards ) );
|
||||
if ( btn == this.craftMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == fuzzyMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||
if ( btn == this.fuzzyMode )
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
protected boolean hasToolbox()
|
||||
{
|
||||
return ((ContainerUpgradeable) inventorySlots).hasToolbox();
|
||||
return ((ContainerUpgradeable) this.inventorySlots).hasToolbox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
handleButtonVisibility();
|
||||
this.handleButtonVisibility();
|
||||
|
||||
bindTexture( getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, ySize );
|
||||
if ( drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + cvb.availableUpgrades() * 18 );
|
||||
if ( hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + ySize - 90, 178, ySize - 90, 68, 68 );
|
||||
this.bindTexture( this.getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
if ( this.drawUpgrades() )
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvb.availableUpgrades() * 18 );
|
||||
if ( this.hasToolbox() )
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
|
||||
protected boolean drawUpgrades()
|
||||
@@ -125,33 +125,33 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
if ( redstoneMode != null )
|
||||
redstoneMode.setVisibility( bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );
|
||||
if ( fuzzyMode != null )
|
||||
fuzzyMode.setVisibility( bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||
if ( craftMode != null )
|
||||
craftMode.setVisibility( bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
if ( this.redstoneMode != null )
|
||||
this.redstoneMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );
|
||||
if ( this.fuzzyMode != null )
|
||||
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||
if ( this.craftMode != null )
|
||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( getName().getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( this.getName().getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( redstoneMode != null )
|
||||
redstoneMode.set( cvb.rsMode );
|
||||
if ( this.redstoneMode != null )
|
||||
this.redstoneMode.set( this.cvb.rsMode );
|
||||
|
||||
if ( fuzzyMode != null )
|
||||
fuzzyMode.set( cvb.fzMode );
|
||||
if ( this.fuzzyMode != null )
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
|
||||
if ( craftMode != null )
|
||||
craftMode.set( cvb.cMode );
|
||||
if ( this.craftMode != null )
|
||||
this.craftMode.set( this.cvb.cMode );
|
||||
}
|
||||
|
||||
protected GuiText getName()
|
||||
{
|
||||
return bc instanceof PartImportBus ? GuiText.ImportBus : GuiText.ExportBus;
|
||||
return this.bc instanceof PartImportBus ? GuiText.ImportBus : GuiText.ExportBus;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
public GuiVibrationChamber(InventoryPlayer inventoryPlayer, TileVibrationChamber te)
|
||||
{
|
||||
super( new ContainerVibrationChamber( inventoryPlayer, te ) );
|
||||
cvc = (ContainerVibrationChamber) inventorySlots;
|
||||
this.cvc = (ContainerVibrationChamber) this.inventorySlots;
|
||||
this.ySize = 166;
|
||||
}
|
||||
|
||||
@@ -47,34 +47,34 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
pb = new GuiProgressBar( cvc, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( pb );
|
||||
this.pb = new GuiProgressBar( this.cvc, "guis/vibchamber.png", 99, 36, 176, 14, 6, 18, Direction.VERTICAL );
|
||||
this.buttonList.add( this.pb );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/vibchamber.png" );
|
||||
pb.xPosition = 99 + guiLeft;
|
||||
pb.yPosition = 36 + guiTop;
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/vibchamber.png" );
|
||||
this.pb.xPosition = 99 + this.guiLeft;
|
||||
this.pb.yPosition = 36 + this.guiTop;
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.VibrationChamber.getLocal() ), 8, 6, 4210752 );
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
int k = 25;
|
||||
int l = -15;
|
||||
|
||||
pb.setFullMsg( cvc.aePerTick * cvc.getCurrentProgress() / 100 + " ae/t" );
|
||||
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " ae/t" );
|
||||
|
||||
if ( cvc.getCurrentProgress() > 0 )
|
||||
if ( this.cvc.getCurrentProgress() > 0 )
|
||||
{
|
||||
int i1 = cvc.getCurrentProgress();
|
||||
bindTexture( "guis/vibchamber.png" );
|
||||
int i1 = this.cvc.getCurrentProgress();
|
||||
this.bindTexture( "guis/vibchamber.png" );
|
||||
GL11.glColor3f( 1, 1, 1 );
|
||||
this.drawTexturedModalRect( k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2 );
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ public class GuiWireless extends AEBaseGui
|
||||
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if ( btn == units )
|
||||
if ( btn == this.units )
|
||||
{
|
||||
AEConfig.instance.nextPowerUnit( backwards );
|
||||
units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
this.units.set( AEConfig.instance.selectedPowerUnit() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ public class GuiWireless extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
units = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
buttonList.add( units );
|
||||
this.units = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.POWER_UNITS, AEConfig.instance.selectedPowerUnit() );
|
||||
this.buttonList.add( this.units );
|
||||
}
|
||||
|
||||
public GuiWireless(InventoryPlayer inventoryPlayer, TileWireless te) {
|
||||
@@ -68,27 +68,27 @@ public class GuiWireless extends AEBaseGui
|
||||
@Override
|
||||
public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
bindTexture( "guis/wireless.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize );
|
||||
this.bindTexture( "guis/wireless.png" );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, this.xSize, this.ySize );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRendererObj.drawString( getGuiDisplayName( GuiText.Wireless.getLocal() ), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
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) inventorySlots;
|
||||
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 );
|
||||
|
||||
int strWidth = Math.max( fontRendererObj.getStringWidth( firstMessage ), fontRendererObj.getStringWidth( secondMessage ) );
|
||||
int strWidth = Math.max( this.fontRendererObj.getStringWidth( firstMessage ), this.fontRendererObj.getStringWidth( secondMessage ) );
|
||||
int cOffset = (this.xSize / 2) - (strWidth / 2);
|
||||
fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
|
||||
fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
|
||||
this.fontRendererObj.drawString( firstMessage, cOffset, 20, 4210752 );
|
||||
this.fontRendererObj.drawString( secondMessage, cOffset, 20 + 12, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ public class GuiWirelessTerm extends GuiMEPortableCell
|
||||
|
||||
public GuiWirelessTerm(InventoryPlayer inventoryPlayer, IPortableCell te) {
|
||||
super( inventoryPlayer, te );
|
||||
maxRows = Integer.MAX_VALUE;
|
||||
this.maxRows = Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
int getMaxRows()
|
||||
{
|
||||
return defaultGetMaxRows();
|
||||
return this.defaultGetMaxRows();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,21 +35,21 @@ public class GuiNumberBox extends GuiTextField
|
||||
@Override
|
||||
public void writeText(String p_146191_1_)
|
||||
{
|
||||
String original = getText();
|
||||
String original = this.getText();
|
||||
super.writeText( p_146191_1_ );
|
||||
|
||||
try
|
||||
{
|
||||
if ( type == int.class || type == Integer.class )
|
||||
Integer.parseInt( getText() );
|
||||
else if ( type == long.class || type == Long.class )
|
||||
Long.parseLong( getText() );
|
||||
else if ( type == double.class || type == Double.class )
|
||||
Double.parseDouble( getText() );
|
||||
if ( this.type == int.class || this.type == Integer.class )
|
||||
Integer.parseInt( this.getText() );
|
||||
else if ( this.type == long.class || this.type == Long.class )
|
||||
Long.parseLong( this.getText() );
|
||||
else if ( this.type == double.class || this.type == Double.class )
|
||||
Double.parseDouble( this.getText() );
|
||||
}
|
||||
catch(NumberFormatException e )
|
||||
{
|
||||
setText( original );
|
||||
this.setText( original );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
this.xPosition = posX;
|
||||
this.yPosition = posY;
|
||||
this.texture = new ResourceLocation( "appliedenergistics2", "textures/" + texture );
|
||||
width = _width;
|
||||
height = _height;
|
||||
fill_u = u;
|
||||
fill_v = y;
|
||||
layout = dir;
|
||||
titleName = title;
|
||||
this.width = _width;
|
||||
this.height = _height;
|
||||
this.fill_u = u;
|
||||
this.fill_v = y;
|
||||
this.layout = dir;
|
||||
this.titleName = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,19 +68,19 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
{
|
||||
if ( this.visible )
|
||||
{
|
||||
par1Minecraft.getTextureManager().bindTexture( texture );
|
||||
int max = source.getMaxProgress();
|
||||
int current = source.getCurrentProgress();
|
||||
par1Minecraft.getTextureManager().bindTexture( this.texture );
|
||||
int max = this.source.getMaxProgress();
|
||||
int current = this.source.getCurrentProgress();
|
||||
|
||||
if ( layout == Direction.VERTICAL )
|
||||
if ( this.layout == Direction.VERTICAL )
|
||||
{
|
||||
int diff = height - (max > 0 ? (height * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition + diff, fill_u, fill_v + diff, width, height - diff );
|
||||
int diff = this.height - (max > 0 ? (this.height * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition + diff, this.fill_u, this.fill_v + diff, this.width, this.height - diff );
|
||||
}
|
||||
else
|
||||
{
|
||||
int diff = width - (max > 0 ? (width * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, fill_u + diff, fill_v, width - diff, height );
|
||||
int diff = this.width - (max > 0 ? (this.width * current) / max : 0);
|
||||
this.drawTexturedModalRect( this.xPosition, this.yPosition, this.fill_u + diff, this.fill_v, this.width - diff, this.height );
|
||||
}
|
||||
|
||||
this.mouseDragged( par1Minecraft, par2, par3 );
|
||||
@@ -95,34 +95,34 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public String getMessage()
|
||||
{
|
||||
if ( fullMsg != null )
|
||||
return fullMsg;
|
||||
if ( this.fullMsg != null )
|
||||
return this.fullMsg;
|
||||
|
||||
return (titleName != null ? titleName : "") + '\n' + source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + source.getMaxProgress();
|
||||
return (this.titleName != null ? this.titleName : "") + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int xPos()
|
||||
{
|
||||
return xPosition - 2;
|
||||
return this.xPosition - 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int yPos()
|
||||
{
|
||||
return yPosition - 2;
|
||||
return this.yPosition - 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth()
|
||||
{
|
||||
return width + 4;
|
||||
return this.width + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight()
|
||||
{
|
||||
return height + 4;
|
||||
return this.height + 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public class GuiScrollbar implements IScrollSource
|
||||
|
||||
private void applyRange()
|
||||
{
|
||||
currentScroll = Math.max( Math.min( currentScroll, maxScroll ), minScroll );
|
||||
this.currentScroll = Math.max( Math.min( this.currentScroll, this.maxScroll ), this.minScroll );
|
||||
}
|
||||
|
||||
public void draw(AEBaseGui g)
|
||||
@@ -45,97 +45,97 @@ public class GuiScrollbar implements IScrollSource
|
||||
g.bindTexture( "minecraft", "gui/container/creative_inventory/tabs.png" );
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if ( getRange() == 0 )
|
||||
if ( this.getRange() == 0 )
|
||||
{
|
||||
g.drawTexturedModalRect( displayX, displayY, 232 + width, 0, width, 15 );
|
||||
g.drawTexturedModalRect( this.displayX, this.displayY, 232 + this.width, 0, this.width, 15 );
|
||||
}
|
||||
else
|
||||
{
|
||||
int offset = (currentScroll - minScroll) * (height - 15) / getRange();
|
||||
g.drawTexturedModalRect( displayX, offset + displayY, 232, 0, width, 15 );
|
||||
int offset = (this.currentScroll - this.minScroll) * (this.height - 15) / this.getRange();
|
||||
g.drawTexturedModalRect( this.displayX, offset + this.displayY, 232, 0, this.width, 15 );
|
||||
}
|
||||
}
|
||||
|
||||
public int getRange()
|
||||
{
|
||||
return maxScroll - minScroll;
|
||||
return this.maxScroll - this.minScroll;
|
||||
}
|
||||
|
||||
public int getLeft()
|
||||
{
|
||||
return displayX;
|
||||
return this.displayX;
|
||||
}
|
||||
|
||||
public int getTop()
|
||||
{
|
||||
return displayY;
|
||||
return this.displayY;
|
||||
}
|
||||
|
||||
public int getWidth()
|
||||
{
|
||||
return width;
|
||||
return this.width;
|
||||
}
|
||||
|
||||
public int getHeight()
|
||||
{
|
||||
return height;
|
||||
return this.height;
|
||||
}
|
||||
|
||||
public GuiScrollbar setLeft(int v)
|
||||
{
|
||||
displayX = v;
|
||||
this.displayX = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setTop(int v)
|
||||
{
|
||||
displayY = v;
|
||||
this.displayY = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setWidth(int v)
|
||||
{
|
||||
width = v;
|
||||
this.width = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public GuiScrollbar setHeight(int v)
|
||||
{
|
||||
height = v;
|
||||
this.height = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRange(int min, int max, int pageSize)
|
||||
{
|
||||
minScroll = min;
|
||||
maxScroll = max;
|
||||
this.minScroll = min;
|
||||
this.maxScroll = max;
|
||||
this.pageSize = pageSize;
|
||||
|
||||
if ( minScroll > maxScroll )
|
||||
maxScroll = minScroll;
|
||||
if ( this.minScroll > this.maxScroll )
|
||||
this.maxScroll = this.minScroll;
|
||||
|
||||
applyRange();
|
||||
this.applyRange();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentScroll()
|
||||
{
|
||||
return currentScroll;
|
||||
return this.currentScroll;
|
||||
}
|
||||
|
||||
public void click(AEBaseGui aeBaseGui, int x, int y)
|
||||
{
|
||||
if ( getRange() == 0 )
|
||||
if ( this.getRange() == 0 )
|
||||
return;
|
||||
|
||||
if ( x > displayX && x <= displayX + width )
|
||||
if ( x > this.displayX && x <= this.displayX + this.width )
|
||||
{
|
||||
if ( y > displayY && y <= displayY + height )
|
||||
if ( y > this.displayY && y <= this.displayY + this.height )
|
||||
{
|
||||
currentScroll = (y - displayY);
|
||||
currentScroll = minScroll + ((currentScroll * 2 * getRange() / height));
|
||||
currentScroll = (currentScroll + 1) >> 1;
|
||||
applyRange();
|
||||
this.currentScroll = (y - this.displayY);
|
||||
this.currentScroll = this.minScroll + ((this.currentScroll * 2 * this.getRange() / this.height));
|
||||
this.currentScroll = (this.currentScroll + 1) >> 1;
|
||||
this.applyRange();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,8 +143,8 @@ public class GuiScrollbar implements IScrollSource
|
||||
public void wheel(int delta)
|
||||
{
|
||||
delta = Math.max( Math.min( -delta, 1 ), -1 );
|
||||
currentScroll += delta * pageSize;
|
||||
applyRange();
|
||||
this.currentScroll += delta * this.pageSize;
|
||||
this.applyRange();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class MEGuiTextField extends GuiTextField
|
||||
{
|
||||
super.mouseClicked( xPos, yPos, button );
|
||||
|
||||
final boolean requiresFocus = isMouseIn( xPos, yPos );
|
||||
final boolean requiresFocus = this.isMouseIn( xPos, yPos );
|
||||
|
||||
this.setFocused( requiresFocus );
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
final public long sortBy;
|
||||
|
||||
public ClientDCInternalInv(int size, long id, long sortBy, String unlocalizedName) {
|
||||
inv = new AppEngInternalInventory( null, size );
|
||||
this.inv = new AppEngInternalInventory( null, size );
|
||||
this.unlocalizedName = unlocalizedName;
|
||||
this.id = id;
|
||||
this.sortBy = sortBy;
|
||||
@@ -39,16 +39,16 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
|
||||
public String getName()
|
||||
{
|
||||
String s = StatCollector.translateToLocal( unlocalizedName + ".name" );
|
||||
if ( s.equals( unlocalizedName + ".name" ) )
|
||||
return StatCollector.translateToLocal( unlocalizedName );
|
||||
String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
if ( s.equals( this.unlocalizedName + ".name" ) )
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(ClientDCInternalInv o)
|
||||
{
|
||||
return ItemSorters.compareLong( sortBy, o.sortBy );
|
||||
return ItemSorters.compareLong( this.sortBy, o.sortBy );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,16 +39,16 @@ public class InternalSlotME
|
||||
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return repo.getItem( offset );
|
||||
return this.repo.getItem( this.offset );
|
||||
}
|
||||
|
||||
public IAEItemStack getAEStack()
|
||||
{
|
||||
return repo.getReferenceItem( offset );
|
||||
return this.repo.getReferenceItem( this.offset );
|
||||
}
|
||||
|
||||
public boolean hasPower()
|
||||
{
|
||||
return repo.hasPower();
|
||||
return this.repo.hasPower();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,30 +64,30 @@ public class ItemRepo
|
||||
|
||||
public IAEItemStack getReferenceItem(int idx)
|
||||
{
|
||||
idx += src.getCurrentScroll() * rowSize;
|
||||
idx += this.src.getCurrentScroll() * this.rowSize;
|
||||
|
||||
if ( idx >= view.size() )
|
||||
if ( idx >= this.view.size() )
|
||||
return null;
|
||||
return view.get( idx );
|
||||
return this.view.get( idx );
|
||||
}
|
||||
|
||||
public ItemStack getItem(int idx)
|
||||
{
|
||||
idx += src.getCurrentScroll() * rowSize;
|
||||
idx += this.src.getCurrentScroll() * this.rowSize;
|
||||
|
||||
if ( idx >= dsp.size() )
|
||||
if ( idx >= this.dsp.size() )
|
||||
return null;
|
||||
return dsp.get( idx );
|
||||
return this.dsp.get( idx );
|
||||
}
|
||||
|
||||
void setSearch(String search)
|
||||
{
|
||||
searchString = search == null ? "" : search;
|
||||
this.searchString = search == null ? "" : search;
|
||||
}
|
||||
|
||||
public void postUpdate(IAEItemStack is)
|
||||
{
|
||||
IAEItemStack st = list.findPrecise( is );
|
||||
IAEItemStack st = this.list.findPrecise( is );
|
||||
|
||||
if ( st != null )
|
||||
{
|
||||
@@ -95,15 +95,15 @@ public class ItemRepo
|
||||
st.add( is );
|
||||
}
|
||||
else
|
||||
list.add( is );
|
||||
this.list.add( is );
|
||||
}
|
||||
|
||||
IPartitionList<IAEItemStack> myPartitionList;
|
||||
|
||||
public void setViewCell(ItemStack[] list)
|
||||
{
|
||||
myPartitionList = ItemViewCell.createFilter( list );
|
||||
updateView();
|
||||
this.myPartitionList = ItemViewCell.createFilter( list );
|
||||
this.updateView();
|
||||
}
|
||||
|
||||
private String NEIWord = null;
|
||||
@@ -112,16 +112,16 @@ public class ItemRepo
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( NEIWord == null || !NEIWord.equals( filter ) )
|
||||
if ( this.NEIWord == null || !this.NEIWord.equals( filter ) )
|
||||
{
|
||||
Class c = ReflectionHelper.getClass( getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
Field fldSearchField = c.getField( "searchField" );
|
||||
Object searchField = fldSearchField.get( c );
|
||||
|
||||
Method a = searchField.getClass().getMethod( "setText", String.class );
|
||||
Method b = searchField.getClass().getMethod( "onTextChange", String.class );
|
||||
|
||||
NEIWord = filter;
|
||||
this.NEIWord = filter;
|
||||
a.invoke( searchField, filter );
|
||||
b.invoke( searchField, "" );
|
||||
}
|
||||
@@ -134,38 +134,38 @@ public class ItemRepo
|
||||
|
||||
public void updateView()
|
||||
{
|
||||
view.clear();
|
||||
dsp.clear();
|
||||
this.view.clear();
|
||||
this.dsp.clear();
|
||||
|
||||
view.ensureCapacity( list.size() );
|
||||
dsp.ensureCapacity( list.size() );
|
||||
this.view.ensureCapacity( this.list.size() );
|
||||
this.dsp.ensureCapacity( this.list.size() );
|
||||
|
||||
Enum viewMode = sortSrc.getSortDisplay();
|
||||
Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if ( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
updateNEI( searchString );
|
||||
this.updateNEI( this.searchString );
|
||||
|
||||
innerSearch = searchString;
|
||||
this.innerSearch = this.searchString;
|
||||
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
// boolean terminalSearchMods = Configuration.instance.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
|
||||
|
||||
boolean searchMod = false;
|
||||
if ( innerSearch.startsWith( "@" ) )
|
||||
if ( this.innerSearch.startsWith( "@" ) )
|
||||
{
|
||||
searchMod = true;
|
||||
innerSearch = innerSearch.substring( 1 );
|
||||
this.innerSearch = this.innerSearch.substring( 1 );
|
||||
}
|
||||
|
||||
Pattern m = null;
|
||||
try
|
||||
{
|
||||
m = Pattern.compile( innerSearch.toLowerCase(), Pattern.CASE_INSENSITIVE );
|
||||
m = Pattern.compile( this.innerSearch.toLowerCase(), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch (Throwable ignore)
|
||||
{
|
||||
try
|
||||
{
|
||||
m = Pattern.compile( Pattern.quote( innerSearch.toLowerCase() ), Pattern.CASE_INSENSITIVE );
|
||||
m = Pattern.compile( Pattern.quote( this.innerSearch.toLowerCase() ), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch (Throwable __)
|
||||
{
|
||||
@@ -174,11 +174,11 @@ public class ItemRepo
|
||||
}
|
||||
|
||||
boolean notDone = false;
|
||||
for (IAEItemStack is : list)
|
||||
for (IAEItemStack is : this.list)
|
||||
{
|
||||
if ( myPartitionList != null )
|
||||
if ( this.myPartitionList != null )
|
||||
{
|
||||
if ( !myPartitionList.isListed( is ) )
|
||||
if ( !this.myPartitionList.isListed( is ) )
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public class ItemRepo
|
||||
|
||||
if ( m.matcher( dspName.toLowerCase() ).find() )
|
||||
{
|
||||
view.add( is );
|
||||
this.view.add( is );
|
||||
notDone = false;
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ public class ItemRepo
|
||||
for (Object lp : Platform.getTooltip( is ))
|
||||
if ( lp instanceof String && m.matcher( (String) lp ).find() )
|
||||
{
|
||||
view.add( is );
|
||||
this.view.add( is );
|
||||
notDone = false;
|
||||
break;
|
||||
}
|
||||
@@ -220,40 +220,40 @@ public class ItemRepo
|
||||
*/
|
||||
}
|
||||
|
||||
Enum SortBy = sortSrc.getSortBy();
|
||||
Enum SortDir = sortSrc.getSortDir();
|
||||
Enum SortBy = this.sortSrc.getSortBy();
|
||||
Enum SortDir = this.sortSrc.getSortDir();
|
||||
|
||||
ItemSorters.Direction = (appeng.api.config.SortDir) SortDir;
|
||||
ItemSorters.init();
|
||||
|
||||
if ( SortBy == SortOrder.MOD )
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortByMod );
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByMod );
|
||||
else if ( SortBy == SortOrder.AMOUNT )
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortBySize );
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortBySize );
|
||||
else if ( SortBy == SortOrder.INVTWEAKS )
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortByInvTweaks );
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByInvTweaks );
|
||||
else
|
||||
Collections.sort( view, ItemSorters.ConfigBased_SortByName );
|
||||
Collections.sort( this.view, ItemSorters.ConfigBased_SortByName );
|
||||
|
||||
for (IAEItemStack is : view)
|
||||
dsp.add( is.getItemStack() );
|
||||
for (IAEItemStack is : this.view)
|
||||
this.dsp.add( is.getItemStack() );
|
||||
}
|
||||
|
||||
public int size()
|
||||
{
|
||||
return view.size();
|
||||
return this.view.size();
|
||||
}
|
||||
|
||||
public void clear()
|
||||
{
|
||||
list.resetStatus();
|
||||
this.list.resetStatus();
|
||||
}
|
||||
|
||||
private boolean hasPower;
|
||||
|
||||
public boolean hasPower()
|
||||
{
|
||||
return hasPower;
|
||||
return this.hasPower;
|
||||
}
|
||||
|
||||
public void setPower(boolean hasPower)
|
||||
|
||||
@@ -32,7 +32,7 @@ public class SlotDisconnected extends AppEngSlot
|
||||
|
||||
public SlotDisconnected(ClientDCInternalInv me, int which, int x, int y) {
|
||||
super( me.inv, which, x, y );
|
||||
mySlot = me;
|
||||
this.mySlot = me;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,7 +73,7 @@ public class SlotDisconnected extends AppEngSlot
|
||||
@Override
|
||||
public boolean getHasStack()
|
||||
{
|
||||
return getStack() != null;
|
||||
return this.getStack() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,21 +31,21 @@ public class SlotME extends Slot
|
||||
|
||||
public SlotME(InternalSlotME me) {
|
||||
super( null, 0, me.xPos, me.yPos );
|
||||
mySlot = me;
|
||||
this.mySlot = me;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStack()
|
||||
{
|
||||
if ( mySlot.hasPower() )
|
||||
return mySlot.getStack();
|
||||
if ( this.mySlot.hasPower() )
|
||||
return this.mySlot.getStack();
|
||||
return null;
|
||||
}
|
||||
|
||||
public IAEItemStack getAEStack()
|
||||
{
|
||||
if ( mySlot.hasPower() )
|
||||
return mySlot.getAEStack();
|
||||
if ( this.mySlot.hasPower() )
|
||||
return this.mySlot.getAEStack();
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ public class SlotME extends Slot
|
||||
@Override
|
||||
public boolean getHasStack()
|
||||
{
|
||||
if ( mySlot.hasPower() )
|
||||
return getStack() != null;
|
||||
if ( this.mySlot.hasPower() )
|
||||
return this.getStack() != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public class AppEngRenderItem extends RenderItem
|
||||
GL11.glEnable( GL11.GL_DEPTH_TEST );
|
||||
}
|
||||
|
||||
long amount = aeStack != null ? aeStack.getStackSize() : is.stackSize;
|
||||
long amount = this.aeStack != null ? this.aeStack.getStackSize() : is.stackSize;
|
||||
if ( amount > 999999999999L )
|
||||
amount = 999999999999L;
|
||||
|
||||
|
||||
@@ -276,14 +276,14 @@ public class BaseBlockRender
|
||||
}
|
||||
|
||||
public BaseBlockRender(boolean enableTESR, double tileEntitySpecialRendererRange) {
|
||||
hasTESR = enableTESR;
|
||||
MAX_DISTANCE = tileEntitySpecialRendererRange;
|
||||
this.hasTESR = enableTESR;
|
||||
this.MAX_DISTANCE = tileEntitySpecialRendererRange;
|
||||
setOriMap();
|
||||
}
|
||||
|
||||
public double getTesrRenderDistance()
|
||||
{
|
||||
return MAX_DISTANCE;
|
||||
return this.MAX_DISTANCE;
|
||||
}
|
||||
|
||||
public IIcon firstNotNull(IIcon... s)
|
||||
@@ -313,7 +313,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.DOWN ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.DOWN ),
|
||||
block.getIcon( ForgeDirection.DOWN.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -328,7 +328,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.UP ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.UP ),
|
||||
block.getIcon( ForgeDirection.UP.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -343,7 +343,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.NORTH ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.NORTH ),
|
||||
block.getIcon( ForgeDirection.NORTH.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -358,7 +358,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.SOUTH ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.SOUTH ),
|
||||
block.getIcon( ForgeDirection.SOUTH.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -373,7 +373,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.WEST ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.WEST ),
|
||||
block.getIcon( ForgeDirection.WEST.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -388,7 +388,7 @@ public class BaseBlockRender
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D,
|
||||
firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.EAST ),
|
||||
this.firstNotNull( renderer.overrideBlockTexture, block.getRendererInstance().getTexture( ForgeDirection.EAST ),
|
||||
block.getIcon( ForgeDirection.EAST.ordinal(), meta ) ) );
|
||||
tess.draw();
|
||||
}
|
||||
@@ -419,7 +419,7 @@ public class BaseBlockRender
|
||||
getOrientation( ForgeDirection.SOUTH, ForgeDirection.SOUTH, ForgeDirection.UP ) );
|
||||
}
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), block, item, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), block, item, tess, 0xffffff, renderer );
|
||||
|
||||
if ( block.hasSubtypes() )
|
||||
info.setTemporaryRenderIcon( null );
|
||||
@@ -442,7 +442,7 @@ public class BaseBlockRender
|
||||
ForgeDirection up = ForgeDirection.UP;
|
||||
|
||||
BlockRenderInfo info = block.getRendererInstance();
|
||||
IOrientable te = getOrientable( block, world, x, y, z );
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
if ( te != null )
|
||||
{
|
||||
forward = te.getForward();
|
||||
@@ -467,11 +467,11 @@ public class BaseBlockRender
|
||||
|
||||
public boolean renderInWorld(AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
preRenderInWorld( block, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
boolean o = renderer.renderStandardBlock( block, x, y, z );
|
||||
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -489,27 +489,27 @@ public class BaseBlockRender
|
||||
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
rotMat.put( 0, west.offsetX );
|
||||
rotMat.put( 1, west.offsetY );
|
||||
rotMat.put( 2, west.offsetZ );
|
||||
rotMat.put( 3, 0 );
|
||||
this.rotMat.put( 0, west.offsetX );
|
||||
this.rotMat.put( 1, west.offsetY );
|
||||
this.rotMat.put( 2, west.offsetZ );
|
||||
this.rotMat.put( 3, 0 );
|
||||
|
||||
rotMat.put( 4, up.offsetX );
|
||||
rotMat.put( 5, up.offsetY );
|
||||
rotMat.put( 6, up.offsetZ );
|
||||
rotMat.put( 7, 0 );
|
||||
this.rotMat.put( 4, up.offsetX );
|
||||
this.rotMat.put( 5, up.offsetY );
|
||||
this.rotMat.put( 6, up.offsetZ );
|
||||
this.rotMat.put( 7, 0 );
|
||||
|
||||
rotMat.put( 8, forward.offsetX );
|
||||
rotMat.put( 9, forward.offsetY );
|
||||
rotMat.put( 10, forward.offsetZ );
|
||||
rotMat.put( 11, 0 );
|
||||
this.rotMat.put( 8, forward.offsetX );
|
||||
this.rotMat.put( 9, forward.offsetY );
|
||||
this.rotMat.put( 10, forward.offsetZ );
|
||||
this.rotMat.put( 11, 0 );
|
||||
|
||||
rotMat.put( 12, 0 );
|
||||
rotMat.put( 13, 0 );
|
||||
rotMat.put( 14, 0 );
|
||||
rotMat.put( 15, 1 );
|
||||
this.rotMat.put( 12, 0 );
|
||||
this.rotMat.put( 13, 0 );
|
||||
this.rotMat.put( 14, 0 );
|
||||
this.rotMat.put( 15, 1 );
|
||||
GL11.glTranslated( x + 0.5, y + 0.5, z + 0.5 );
|
||||
GL11.glMultMatrix( rotMat );
|
||||
GL11.glMultMatrix( this.rotMat );
|
||||
GL11.glTranslated( -0.5, -0.5, -0.5 );
|
||||
GL11.glCullFace( GL11.GL_FRONT );
|
||||
}
|
||||
@@ -663,25 +663,25 @@ public class BaseBlockRender
|
||||
offsetY += y;
|
||||
offsetZ += z;
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
this.renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0, 1.0,
|
||||
// v -> v
|
||||
0, edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
this.renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0.0, edgeThickness,
|
||||
// v -> v
|
||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
this.renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
1.0 - edgeThickness, 1.0,
|
||||
// v -> v
|
||||
edgeThickness, 1.0 - edgeThickness, ico, flip );
|
||||
|
||||
renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
this.renderFace( tess, offsetX, offsetY, offsetZ, layerAX, layerAY, layerAZ, layerBX, layerBY, layerBZ,
|
||||
// u -> u
|
||||
0, 1.0,
|
||||
// v -> v
|
||||
@@ -721,13 +721,13 @@ public class BaseBlockRender
|
||||
v1 = 16 - v1;
|
||||
v2 = 16 - v2;
|
||||
|
||||
double minX = (forward.offsetX > 0 ? 1 : 0) + mapFaceUV( west.offsetX, u1 ) + mapFaceUV( up.offsetX, v1 );
|
||||
double minY = (forward.offsetY > 0 ? 1 : 0) + mapFaceUV( west.offsetY, u1 ) + mapFaceUV( up.offsetY, v1 );
|
||||
double minZ = (forward.offsetZ > 0 ? 1 : 0) + mapFaceUV( west.offsetZ, u1 ) + mapFaceUV( up.offsetZ, v1 );
|
||||
double minX = (forward.offsetX > 0 ? 1 : 0) + this.mapFaceUV( west.offsetX, u1 ) + this.mapFaceUV( up.offsetX, v1 );
|
||||
double minY = (forward.offsetY > 0 ? 1 : 0) + this.mapFaceUV( west.offsetY, u1 ) + this.mapFaceUV( up.offsetY, v1 );
|
||||
double minZ = (forward.offsetZ > 0 ? 1 : 0) + this.mapFaceUV( west.offsetZ, u1 ) + this.mapFaceUV( up.offsetZ, v1 );
|
||||
|
||||
double maxX = (forward.offsetX > 0 ? 1 : 0) + mapFaceUV( west.offsetX, u2 ) + mapFaceUV( up.offsetX, v2 );
|
||||
double maxY = (forward.offsetY > 0 ? 1 : 0) + mapFaceUV( west.offsetY, u2 ) + mapFaceUV( up.offsetY, v2 );
|
||||
double maxZ = (forward.offsetZ > 0 ? 1 : 0) + mapFaceUV( west.offsetZ, u2 ) + mapFaceUV( up.offsetZ, v2 );
|
||||
double maxX = (forward.offsetX > 0 ? 1 : 0) + this.mapFaceUV( west.offsetX, u2 ) + this.mapFaceUV( up.offsetX, v2 );
|
||||
double maxY = (forward.offsetY > 0 ? 1 : 0) + this.mapFaceUV( west.offsetY, u2 ) + this.mapFaceUV( up.offsetY, v2 );
|
||||
double maxZ = (forward.offsetZ > 0 ? 1 : 0) + this.mapFaceUV( west.offsetZ, u2 ) + this.mapFaceUV( up.offsetZ, v2 );
|
||||
|
||||
renderer.renderMinX = Math.max( 0.0, Math.min( minX, maxX ) - (forward.offsetX != 0 ? 0 : 0.001) );
|
||||
renderer.renderMaxX = Math.min( 1.0, Math.max( minX, maxX ) + (forward.offsetX != 0 ? 0 : 0.001) );
|
||||
@@ -757,7 +757,7 @@ public class BaseBlockRender
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateTop = renderer.uvRotateEast = renderer.uvRotateWest = renderer.uvRotateNorth = renderer.uvRotateSouth = 0;
|
||||
|
||||
applyTESRRotation( x, y, z, forward, up );
|
||||
this.applyTESRRotation( x, y, z, forward, up );
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
@@ -27,7 +27,7 @@ public class BlockRenderInfo
|
||||
{
|
||||
|
||||
public BlockRenderInfo(BaseBlockRender inst) {
|
||||
rendererInstance = inst;
|
||||
this.rendererInstance = inst;
|
||||
}
|
||||
|
||||
final public BaseBlockRender rendererInstance;
|
||||
@@ -49,60 +49,60 @@ public class BlockRenderInfo
|
||||
|
||||
public void updateIcons(FlippableIcon Bottom, FlippableIcon Top, FlippableIcon North, FlippableIcon South, FlippableIcon East, FlippableIcon West)
|
||||
{
|
||||
topIcon = Top;
|
||||
bottomIcon = Bottom;
|
||||
southIcon = South;
|
||||
northIcon = North;
|
||||
eastIcon = East;
|
||||
westIcon = West;
|
||||
this.topIcon = Top;
|
||||
this.bottomIcon = Bottom;
|
||||
this.southIcon = South;
|
||||
this.northIcon = North;
|
||||
this.eastIcon = East;
|
||||
this.westIcon = West;
|
||||
|
||||
}
|
||||
|
||||
public void setTemporaryRenderIcon(IIcon IIcon)
|
||||
{
|
||||
if ( IIcon == null )
|
||||
useTmp = false;
|
||||
this.useTmp = false;
|
||||
else
|
||||
{
|
||||
useTmp = true;
|
||||
tmpTopIcon.setOriginal( IIcon );
|
||||
tmpBottomIcon.setOriginal( IIcon );
|
||||
tmpSouthIcon.setOriginal( IIcon );
|
||||
tmpNorthIcon.setOriginal( IIcon );
|
||||
tmpEastIcon.setOriginal( IIcon );
|
||||
tmpWestIcon.setOriginal( IIcon );
|
||||
this.useTmp = true;
|
||||
this.tmpTopIcon.setOriginal( IIcon );
|
||||
this.tmpBottomIcon.setOriginal( IIcon );
|
||||
this.tmpSouthIcon.setOriginal( IIcon );
|
||||
this.tmpNorthIcon.setOriginal( IIcon );
|
||||
this.tmpEastIcon.setOriginal( IIcon );
|
||||
this.tmpWestIcon.setOriginal( IIcon );
|
||||
}
|
||||
}
|
||||
|
||||
public void setTemporaryRenderIcons(IIcon nTopIcon, IIcon nBottomIcon, IIcon nSouthIcon, IIcon nNorthIcon, IIcon nEastIcon, IIcon nWestIcon)
|
||||
{
|
||||
tmpTopIcon.setOriginal( nTopIcon == null ? getTexture( ForgeDirection.UP ) : nTopIcon );
|
||||
tmpBottomIcon.setOriginal( nBottomIcon == null ? getTexture( ForgeDirection.DOWN ) : nBottomIcon );
|
||||
tmpSouthIcon.setOriginal( nSouthIcon == null ? getTexture( ForgeDirection.SOUTH ) : nSouthIcon );
|
||||
tmpNorthIcon.setOriginal( nNorthIcon == null ? getTexture( ForgeDirection.NORTH ) : nNorthIcon );
|
||||
tmpEastIcon.setOriginal( nEastIcon == null ? getTexture( ForgeDirection.EAST ) : nEastIcon );
|
||||
tmpWestIcon.setOriginal( nWestIcon == null ? getTexture( ForgeDirection.WEST ) : nWestIcon );
|
||||
useTmp = true;
|
||||
this.tmpTopIcon.setOriginal( nTopIcon == null ? this.getTexture( ForgeDirection.UP ) : nTopIcon );
|
||||
this.tmpBottomIcon.setOriginal( nBottomIcon == null ? this.getTexture( ForgeDirection.DOWN ) : nBottomIcon );
|
||||
this.tmpSouthIcon.setOriginal( nSouthIcon == null ? this.getTexture( ForgeDirection.SOUTH ) : nSouthIcon );
|
||||
this.tmpNorthIcon.setOriginal( nNorthIcon == null ? this.getTexture( ForgeDirection.NORTH ) : nNorthIcon );
|
||||
this.tmpEastIcon.setOriginal( nEastIcon == null ? this.getTexture( ForgeDirection.EAST ) : nEastIcon );
|
||||
this.tmpWestIcon.setOriginal( nWestIcon == null ? this.getTexture( ForgeDirection.WEST ) : nWestIcon );
|
||||
this.useTmp = true;
|
||||
}
|
||||
|
||||
public FlippableIcon getTexture(ForgeDirection dir)
|
||||
{
|
||||
if ( useTmp )
|
||||
if ( this.useTmp )
|
||||
{
|
||||
switch (dir)
|
||||
{
|
||||
case DOWN:
|
||||
return tmpBottomIcon;
|
||||
return this.tmpBottomIcon;
|
||||
case UP:
|
||||
return tmpTopIcon;
|
||||
return this.tmpTopIcon;
|
||||
case NORTH:
|
||||
return tmpNorthIcon;
|
||||
return this.tmpNorthIcon;
|
||||
case SOUTH:
|
||||
return tmpSouthIcon;
|
||||
return this.tmpSouthIcon;
|
||||
case EAST:
|
||||
return tmpEastIcon;
|
||||
return this.tmpEastIcon;
|
||||
case WEST:
|
||||
return tmpWestIcon;
|
||||
return this.tmpWestIcon;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -111,27 +111,27 @@ public class BlockRenderInfo
|
||||
switch (dir)
|
||||
{
|
||||
case DOWN:
|
||||
return bottomIcon;
|
||||
return this.bottomIcon;
|
||||
case UP:
|
||||
return topIcon;
|
||||
return this.topIcon;
|
||||
case NORTH:
|
||||
return northIcon;
|
||||
return this.northIcon;
|
||||
case SOUTH:
|
||||
return southIcon;
|
||||
return this.southIcon;
|
||||
case EAST:
|
||||
return eastIcon;
|
||||
return this.eastIcon;
|
||||
case WEST:
|
||||
return westIcon;
|
||||
return this.westIcon;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return topIcon;
|
||||
return this.topIcon;
|
||||
}
|
||||
|
||||
public boolean isValid()
|
||||
{
|
||||
return topIcon != null && bottomIcon != null && southIcon != null && northIcon != null && eastIcon != null && westIcon != null;
|
||||
return this.topIcon != null && this.bottomIcon != null && this.southIcon != null && this.northIcon != null && this.eastIcon != null && this.westIcon != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void addBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
|
||||
{
|
||||
if ( started )
|
||||
if ( this.started )
|
||||
{
|
||||
this.minX = Math.min( this.minX, (float) minX );
|
||||
this.minY = Math.min( this.minY, (float) minY );
|
||||
@@ -86,7 +86,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
}
|
||||
else
|
||||
{
|
||||
started = true;
|
||||
this.started = true;
|
||||
this.minX = (float) minX;
|
||||
this.minY = (float) minY;
|
||||
this.minZ = (float) minZ;
|
||||
@@ -99,19 +99,19 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public ForgeDirection getWorldX()
|
||||
{
|
||||
return ax;
|
||||
return BusRenderHelper.this.ax;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldY()
|
||||
{
|
||||
return ay;
|
||||
return BusRenderHelper.this.ay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldZ()
|
||||
{
|
||||
return az;
|
||||
return BusRenderHelper.this.az;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,27 +131,27 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
|
||||
public int getItemsRendered()
|
||||
{
|
||||
return itemsRendered;
|
||||
return this.itemsRendered;
|
||||
}
|
||||
|
||||
public void setPass(int pass)
|
||||
{
|
||||
renderingForPass = 0;
|
||||
currentPass = pass;
|
||||
itemsRendered = 0;
|
||||
this.renderingForPass = 0;
|
||||
this.currentPass = pass;
|
||||
this.itemsRendered = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderForPass(int pass)
|
||||
{
|
||||
renderingForPass = pass;
|
||||
this.renderingForPass = pass;
|
||||
}
|
||||
|
||||
public boolean renderThis()
|
||||
{
|
||||
if ( renderingForPass == currentPass || noAlphaPass )
|
||||
if ( this.renderingForPass == this.currentPass || this.noAlphaPass )
|
||||
{
|
||||
itemsRendered++;
|
||||
this.itemsRendered++;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -171,7 +171,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
{
|
||||
RenderBlocksWorkaround rbw = BusRenderer.instance.renderer;
|
||||
|
||||
if ( sim != null && rbw.similarLighting( blk, rbw.blockAccess, x, y, z, sim ) )
|
||||
if ( sim != null && rbw.similarLighting( this.blk, rbw.blockAccess, x, y, z, sim ) )
|
||||
{
|
||||
rbw.populate( sim );
|
||||
rbw.faces = EnumSet.allOf( ForgeDirection.class );
|
||||
@@ -187,35 +187,35 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
rbw.calculations = true;
|
||||
rbw.faces.clear();
|
||||
|
||||
bbc.started = false;
|
||||
this.bbc.started = false;
|
||||
if ( p == null )
|
||||
{
|
||||
bbc.minX = bbc.minY = bbc.minZ = 0;
|
||||
bbc.maxX = bbc.maxY = bbc.maxZ = 16;
|
||||
this.bbc.minX = this.bbc.minY = this.bbc.minZ = 0;
|
||||
this.bbc.maxX = this.bbc.maxY = this.bbc.maxZ = 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
p.getBoxes( bbc );
|
||||
p.getBoxes( this.bbc );
|
||||
|
||||
if ( bbc.minX < 1 )
|
||||
bbc.minX = 1;
|
||||
if ( bbc.minY < 1 )
|
||||
bbc.minY = 1;
|
||||
if ( bbc.minZ < 1 )
|
||||
bbc.minZ = 1;
|
||||
if ( this.bbc.minX < 1 )
|
||||
this.bbc.minX = 1;
|
||||
if ( this.bbc.minY < 1 )
|
||||
this.bbc.minY = 1;
|
||||
if ( this.bbc.minZ < 1 )
|
||||
this.bbc.minZ = 1;
|
||||
|
||||
if ( bbc.maxX > 15 )
|
||||
bbc.maxX = 15;
|
||||
if ( bbc.maxY > 15 )
|
||||
bbc.maxY = 15;
|
||||
if ( bbc.maxZ > 15 )
|
||||
bbc.maxZ = 15;
|
||||
if ( this.bbc.maxX > 15 )
|
||||
this.bbc.maxX = 15;
|
||||
if ( this.bbc.maxY > 15 )
|
||||
this.bbc.maxY = 15;
|
||||
if ( this.bbc.maxZ > 15 )
|
||||
this.bbc.maxZ = 15;
|
||||
}
|
||||
|
||||
setBounds( bbc.minX, bbc.minY, bbc.minZ, bbc.maxX, bbc.maxY, bbc.maxZ );
|
||||
this.setBounds( this.bbc.minX, this.bbc.minY, this.bbc.minZ, this.bbc.maxX, this.bbc.maxY, this.bbc.maxZ );
|
||||
|
||||
bbr.renderBlockBounds( rbw, minX, minY, minZ, maxX, maxY, maxZ, ax, ay, az );
|
||||
rbw.renderStandardBlock( blk, x, y, z );
|
||||
this.bbr.renderBlockBounds( rbw, this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, this.ax, this.ay, this.az );
|
||||
rbw.renderStandardBlock( this.blk, x, y, z );
|
||||
|
||||
rbw.faces = EnumSet.allOf( ForgeDirection.class );
|
||||
rbw.renderAllFaces = allFaces;
|
||||
@@ -245,17 +245,17 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
case UNKNOWN:
|
||||
return 0.5;
|
||||
case DOWN:
|
||||
return minY;
|
||||
return this.minY;
|
||||
case EAST:
|
||||
return maxX;
|
||||
return this.maxX;
|
||||
case NORTH:
|
||||
return minZ;
|
||||
return this.minZ;
|
||||
case SOUTH:
|
||||
return maxZ;
|
||||
return this.maxZ;
|
||||
case UP:
|
||||
return maxY;
|
||||
return this.maxY;
|
||||
case WEST:
|
||||
return minX;
|
||||
return this.minX;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -263,13 +263,13 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void setInvColor(int newColor)
|
||||
{
|
||||
color = newColor;
|
||||
this.color = newColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTexture(IIcon ico)
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ico );
|
||||
this.blk.getRendererInstance().setTemporaryRenderIcon( ico );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -284,16 +284,16 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
list[4] = West;
|
||||
list[5] = East;
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( list[mapRotation( ForgeDirection.UP ).ordinal()],
|
||||
list[mapRotation( ForgeDirection.DOWN ).ordinal()], list[mapRotation( ForgeDirection.SOUTH ).ordinal()],
|
||||
list[mapRotation( ForgeDirection.NORTH ).ordinal()], list[mapRotation( ForgeDirection.EAST ).ordinal()],
|
||||
list[mapRotation( ForgeDirection.WEST ).ordinal()] );
|
||||
this.blk.getRendererInstance().setTemporaryRenderIcons( list[this.mapRotation( ForgeDirection.UP ).ordinal()],
|
||||
list[this.mapRotation( ForgeDirection.DOWN ).ordinal()], list[this.mapRotation( ForgeDirection.SOUTH ).ordinal()],
|
||||
list[this.mapRotation( ForgeDirection.NORTH ).ordinal()], list[this.mapRotation( ForgeDirection.EAST ).ordinal()],
|
||||
list[this.mapRotation( ForgeDirection.WEST ).ordinal()] );
|
||||
}
|
||||
|
||||
public ForgeDirection mapRotation(ForgeDirection dir)
|
||||
{
|
||||
ForgeDirection forward = az;
|
||||
ForgeDirection up = ay;
|
||||
ForgeDirection forward = this.az;
|
||||
ForgeDirection up = this.ay;
|
||||
ForgeDirection west = ForgeDirection.UNKNOWN;
|
||||
|
||||
if ( forward == null || up == null )
|
||||
@@ -328,22 +328,22 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void renderInventoryBox(RenderBlocks renderer)
|
||||
{
|
||||
renderer.setRenderBounds( minX / 16.0, minY / 16.0, minZ / 16.0, maxX / 16.0, maxY / 16.0, maxZ / 16.0 );
|
||||
bbr.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, null, Tessellator.instance, color, renderer );
|
||||
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
|
||||
this.bbr.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), this.blk, null, Tessellator.instance, this.color, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryFace(IIcon IIcon, ForgeDirection face, RenderBlocks renderer)
|
||||
{
|
||||
renderer.setRenderBounds( minX / 16.0, minY / 16.0, minZ / 16.0, maxX / 16.0, maxY / 16.0, maxZ / 16.0 );
|
||||
setTexture( IIcon );
|
||||
bbr.renderInvBlock( EnumSet.of( face ), blk, null, Tessellator.instance, color, renderer );
|
||||
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
|
||||
this.setTexture( IIcon );
|
||||
this.bbr.renderInvBlock( EnumSet.of( face ), this.blk, null, Tessellator.instance, this.color, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBlock(int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
if ( !renderThis() )
|
||||
if ( !this.renderThis() )
|
||||
return;
|
||||
|
||||
AEBaseBlock blk = (AEBaseBlock) AEApi.instance().blocks().blockMultiPart.block();
|
||||
@@ -360,7 +360,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
renderer.uvRotateNorth = info.getTexture( ForgeDirection.NORTH ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.NORTH, forward, up ) );
|
||||
renderer.uvRotateSouth = info.getTexture( ForgeDirection.SOUTH ).setFlip( BaseBlockRender.getOrientation( ForgeDirection.SOUTH, forward, up ) );
|
||||
|
||||
bbr.renderBlockBounds( renderer, minX, minY, minZ, maxX, maxY, maxZ, ax, ay, az );
|
||||
this.bbr.renderBlockBounds( renderer, this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, this.ax, this.ay, this.az );
|
||||
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
}
|
||||
@@ -379,7 +379,7 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
|
||||
public void prepareBounds(RenderBlocks renderer)
|
||||
{
|
||||
bbr.renderBlockBounds( renderer, minX, minY, minZ, maxX, maxY, maxZ, ax, ay, az );
|
||||
this.bbr.renderBlockBounds( renderer, this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ, this.ax, this.ay, this.az );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -391,37 +391,37 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
@Override
|
||||
public void renderBlockCurrentBounds(int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
if ( !renderThis() )
|
||||
if ( !this.renderThis() )
|
||||
return;
|
||||
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
renderer.renderStandardBlock( this.blk, x, y, z );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceCutout(int x, int y, int z, IIcon ico, ForgeDirection face, float edgeThickness, RenderBlocks renderer)
|
||||
{
|
||||
if ( !renderThis() )
|
||||
if ( !this.renderThis() )
|
||||
return;
|
||||
|
||||
switch (face)
|
||||
{
|
||||
case DOWN:
|
||||
face = ay.getOpposite();
|
||||
face = this.ay.getOpposite();
|
||||
break;
|
||||
case EAST:
|
||||
face = ax;
|
||||
face = this.ax;
|
||||
break;
|
||||
case NORTH:
|
||||
face = az.getOpposite();
|
||||
face = this.az.getOpposite();
|
||||
break;
|
||||
case SOUTH:
|
||||
face = az;
|
||||
face = this.az;
|
||||
break;
|
||||
case UP:
|
||||
face = ay;
|
||||
face = this.ay;
|
||||
break;
|
||||
case WEST:
|
||||
face = ax.getOpposite();
|
||||
face = this.ax.getOpposite();
|
||||
break;
|
||||
case UNKNOWN:
|
||||
break;
|
||||
@@ -429,35 +429,35 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
break;
|
||||
}
|
||||
|
||||
bbr.renderCutoutFace( blk, ico, x, y, z, renderer, face, edgeThickness );
|
||||
this.bbr.renderCutoutFace( this.blk, ico, x, y, z, renderer, face, edgeThickness );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFace(int x, int y, int z, IIcon ico, ForgeDirection face, RenderBlocks renderer)
|
||||
{
|
||||
if ( !renderThis() )
|
||||
if ( !this.renderThis() )
|
||||
return;
|
||||
|
||||
prepareBounds( renderer );
|
||||
this.prepareBounds( renderer );
|
||||
switch (face)
|
||||
{
|
||||
case DOWN:
|
||||
face = ay.getOpposite();
|
||||
face = this.ay.getOpposite();
|
||||
break;
|
||||
case EAST:
|
||||
face = ax;
|
||||
face = this.ax;
|
||||
break;
|
||||
case NORTH:
|
||||
face = az.getOpposite();
|
||||
face = this.az.getOpposite();
|
||||
break;
|
||||
case SOUTH:
|
||||
face = az;
|
||||
face = this.az;
|
||||
break;
|
||||
case UP:
|
||||
face = ay;
|
||||
face = this.ay;
|
||||
break;
|
||||
case WEST:
|
||||
face = ax.getOpposite();
|
||||
face = this.ax.getOpposite();
|
||||
break;
|
||||
case UNKNOWN:
|
||||
break;
|
||||
@@ -465,37 +465,37 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
break;
|
||||
}
|
||||
|
||||
bbr.renderFace( x, y, z, blk, ico, renderer, face );
|
||||
this.bbr.renderFace( x, y, z, this.blk, ico, renderer, face );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldX()
|
||||
{
|
||||
return ax;
|
||||
return this.ax;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldY()
|
||||
{
|
||||
return ay;
|
||||
return this.ay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldZ()
|
||||
{
|
||||
return az;
|
||||
return this.az;
|
||||
}
|
||||
|
||||
public void setOrientation(ForgeDirection dx, ForgeDirection dy, ForgeDirection dz)
|
||||
{
|
||||
ax = dx == null ? ForgeDirection.EAST : dx;
|
||||
ay = dy == null ? ForgeDirection.UP : dy;
|
||||
az = dz == null ? ForgeDirection.SOUTH : dz;
|
||||
this.ax = dx == null ? ForgeDirection.EAST : dx;
|
||||
this.ay = dy == null ? ForgeDirection.UP : dy;
|
||||
this.az = dz == null ? ForgeDirection.SOUTH : dz;
|
||||
}
|
||||
|
||||
public double[] getBounds()
|
||||
{
|
||||
return new double[] { minX, minY, minZ, maxX, maxY, maxZ };
|
||||
return new double[] { this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ };
|
||||
}
|
||||
|
||||
public void setBounds(double[] bounds)
|
||||
@@ -503,12 +503,12 @@ public class BusRenderHelper implements IPartRenderHelper
|
||||
if ( bounds == null || bounds.length != 6 )
|
||||
return;
|
||||
|
||||
minX = bounds[0];
|
||||
minY = bounds[1];
|
||||
minZ = bounds[2];
|
||||
maxX = bounds[3];
|
||||
maxY = bounds[4];
|
||||
maxZ = bounds[5];
|
||||
this.minX = bounds[0];
|
||||
this.minY = bounds[1];
|
||||
this.minZ = bounds[2];
|
||||
this.maxX = bounds[3];
|
||||
this.maxY = bounds[4];
|
||||
this.maxZ = bounds[5];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -128,13 +128,13 @@ public class BusRenderer implements IItemRenderer
|
||||
BusRenderHelper.instance.setBounds( 0, 0, 0, 1, 1, 1 );
|
||||
BusRenderHelper.instance.setTexture( null );
|
||||
BusRenderHelper.instance.setInvColor( 0xffffff );
|
||||
renderer.blockAccess = ClientHelper.proxy.getWorld();
|
||||
this.renderer.blockAccess = ClientHelper.proxy.getWorld();
|
||||
|
||||
BusRenderHelper.instance.setOrientation( ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
renderer.useInventoryTint = false;
|
||||
renderer.overrideBlockTexture = null;
|
||||
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
|
||||
this.renderer.useInventoryTint = false;
|
||||
this.renderer.overrideBlockTexture = null;
|
||||
|
||||
if ( item.getItem() instanceof IFacadeItem )
|
||||
{
|
||||
@@ -148,11 +148,11 @@ public class BusRenderer implements IItemRenderer
|
||||
}
|
||||
|
||||
if ( fp != null )
|
||||
fp.renderInventory( BusRenderHelper.instance, renderer );
|
||||
fp.renderInventory( BusRenderHelper.instance, this.renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
IPart ip = getRenderer( item, (IPartItem) item.getItem() );
|
||||
IPart ip = this.getRenderer( item, (IPartItem) item.getItem() );
|
||||
if ( ip != null )
|
||||
{
|
||||
if ( type == ItemRenderType.ENTITY )
|
||||
@@ -161,11 +161,11 @@ public class BusRenderer implements IItemRenderer
|
||||
GL11.glTranslatef( 0.0f, 0.0f, -0.04f * (8 - depth) - 0.06f );
|
||||
}
|
||||
|
||||
ip.renderInventory( BusRenderHelper.instance, renderer );
|
||||
ip.renderInventory( BusRenderHelper.instance, this.renderer );
|
||||
}
|
||||
}
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -105,7 +105,7 @@ public class CableRenderHelper
|
||||
IPart part = cableBusContainer.getPart( s );
|
||||
if ( part != null )
|
||||
{
|
||||
setSide( s );
|
||||
this.setSide( s );
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
renderer.flipTexture = false;
|
||||
@@ -130,7 +130,7 @@ public class CableRenderHelper
|
||||
IPart part = cableBusContainer.getPart( s );
|
||||
if ( part != null )
|
||||
{
|
||||
setSide( s );
|
||||
this.setSide( s );
|
||||
BusRenderHelper brh = BusRenderHelper.instance;
|
||||
BusCollisionHelper bch = new BusCollisionHelper( boxes, brh.getWorldX(), brh.getWorldY(), brh.getWorldZ(), null, true );
|
||||
part.getBoxes( bch );
|
||||
@@ -184,7 +184,7 @@ public class CableRenderHelper
|
||||
renderer.flipTexture = false;
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
setSide( s );
|
||||
this.setSide( s );
|
||||
fPart.renderStatic( te.xCoord, te.yCoord, te.zCoord, BusRenderHelper.instance, renderer, iFacadeContainer, b,
|
||||
cableBusContainer.getPart( s ) == null );
|
||||
}
|
||||
|
||||
@@ -77,71 +77,71 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
public int lightHash;
|
||||
|
||||
public LightingCache(LightingCache secondCSrc) {
|
||||
rXPos = secondCSrc.rXPos;
|
||||
rXNeg = secondCSrc.rXNeg;
|
||||
rYPos = secondCSrc.rYPos;
|
||||
rYNeg = secondCSrc.rYNeg;
|
||||
rZPos = secondCSrc.rZPos;
|
||||
rZNeg = secondCSrc.rZNeg;
|
||||
this.rXPos = secondCSrc.rXPos;
|
||||
this.rXNeg = secondCSrc.rXNeg;
|
||||
this.rYPos = secondCSrc.rYPos;
|
||||
this.rYNeg = secondCSrc.rYNeg;
|
||||
this.rZPos = secondCSrc.rZPos;
|
||||
this.rZNeg = secondCSrc.rZNeg;
|
||||
|
||||
isAO = secondCSrc.isAO;
|
||||
this.isAO = secondCSrc.isAO;
|
||||
|
||||
bXPos = secondCSrc.bXPos;
|
||||
bXNeg = secondCSrc.bXNeg;
|
||||
bYPos = secondCSrc.bYPos;
|
||||
bYNeg = secondCSrc.bYNeg;
|
||||
bZPos = secondCSrc.bZPos;
|
||||
bZNeg = secondCSrc.bZNeg;
|
||||
this.bXPos = secondCSrc.bXPos;
|
||||
this.bXNeg = secondCSrc.bXNeg;
|
||||
this.bYPos = secondCSrc.bYPos;
|
||||
this.bYNeg = secondCSrc.bYNeg;
|
||||
this.bZPos = secondCSrc.bZPos;
|
||||
this.bZNeg = secondCSrc.bZNeg;
|
||||
|
||||
aoXPos = secondCSrc.aoXPos.clone();
|
||||
aoXNeg = secondCSrc.aoXNeg.clone();
|
||||
aoYPos = secondCSrc.aoYPos.clone();
|
||||
aoYNeg = secondCSrc.aoYNeg.clone();
|
||||
aoZPos = secondCSrc.aoZPos.clone();
|
||||
aoZNeg = secondCSrc.aoZNeg.clone();
|
||||
this.aoXPos = secondCSrc.aoXPos.clone();
|
||||
this.aoXNeg = secondCSrc.aoXNeg.clone();
|
||||
this.aoYPos = secondCSrc.aoYPos.clone();
|
||||
this.aoYNeg = secondCSrc.aoYNeg.clone();
|
||||
this.aoZPos = secondCSrc.aoZPos.clone();
|
||||
this.aoZNeg = secondCSrc.aoZNeg.clone();
|
||||
|
||||
foXPos = secondCSrc.foXPos.clone();
|
||||
foXNeg = secondCSrc.foXNeg.clone();
|
||||
foYPos = secondCSrc.foYPos.clone();
|
||||
foYNeg = secondCSrc.foYNeg.clone();
|
||||
foZPos = secondCSrc.foZPos.clone();
|
||||
foZNeg = secondCSrc.foZNeg.clone();
|
||||
this.foXPos = secondCSrc.foXPos.clone();
|
||||
this.foXNeg = secondCSrc.foXNeg.clone();
|
||||
this.foYPos = secondCSrc.foYPos.clone();
|
||||
this.foYNeg = secondCSrc.foYNeg.clone();
|
||||
this.foZPos = secondCSrc.foZPos.clone();
|
||||
this.foZNeg = secondCSrc.foZNeg.clone();
|
||||
|
||||
lightHash = secondCSrc.lightHash;
|
||||
this.lightHash = secondCSrc.lightHash;
|
||||
}
|
||||
|
||||
public LightingCache() {
|
||||
rXPos = null;
|
||||
rXNeg = null;
|
||||
rYPos = null;
|
||||
rYNeg = null;
|
||||
rZPos = null;
|
||||
rZNeg = null;
|
||||
this.rXPos = null;
|
||||
this.rXNeg = null;
|
||||
this.rYPos = null;
|
||||
this.rYNeg = null;
|
||||
this.rZPos = null;
|
||||
this.rZNeg = null;
|
||||
|
||||
isAO = false;
|
||||
this.isAO = false;
|
||||
|
||||
bXPos = 0;
|
||||
bXNeg = 0;
|
||||
bYPos = 0;
|
||||
bYNeg = 0;
|
||||
bZPos = 0;
|
||||
bZNeg = 0;
|
||||
this.bXPos = 0;
|
||||
this.bXNeg = 0;
|
||||
this.bYPos = 0;
|
||||
this.bYNeg = 0;
|
||||
this.bZPos = 0;
|
||||
this.bZNeg = 0;
|
||||
|
||||
aoXPos = new int[5];
|
||||
aoXNeg = new int[5];
|
||||
aoYPos = new int[5];
|
||||
aoYNeg = new int[5];
|
||||
aoZPos = new int[5];
|
||||
aoZNeg = new int[5];
|
||||
this.aoXPos = new int[5];
|
||||
this.aoXNeg = new int[5];
|
||||
this.aoYPos = new int[5];
|
||||
this.aoYNeg = new int[5];
|
||||
this.aoZPos = new int[5];
|
||||
this.aoZNeg = new int[5];
|
||||
|
||||
foXPos = new float[12];
|
||||
foXNeg = new float[12];
|
||||
foYPos = new float[12];
|
||||
foYNeg = new float[12];
|
||||
foZPos = new float[12];
|
||||
foZNeg = new float[12];
|
||||
this.foXPos = new float[12];
|
||||
this.foXNeg = new float[12];
|
||||
this.foYPos = new float[12];
|
||||
this.foYNeg = new float[12];
|
||||
this.foZPos = new float[12];
|
||||
this.foZNeg = new float[12];
|
||||
|
||||
lightHash = 0;
|
||||
this.lightHash = 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -158,19 +158,19 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( fColor == null )
|
||||
if ( this.fColor == null )
|
||||
{
|
||||
try
|
||||
{
|
||||
fColor = Tessellator.class.getDeclaredField( "color" );
|
||||
this.fColor = Tessellator.class.getDeclaredField( "color" );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
fColor = Tessellator.class.getDeclaredField( "field_78402_m" );
|
||||
this.fColor = Tessellator.class.getDeclaredField( "field_78402_m" );
|
||||
}
|
||||
fColor.setAccessible( true );
|
||||
this.fColor.setAccessible( true );
|
||||
}
|
||||
return (Integer) fColor.get( Tessellator.instance );
|
||||
return (Integer) this.fColor.get( Tessellator.instance );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -182,19 +182,19 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( fBrightness == null )
|
||||
if ( this.fBrightness == null )
|
||||
{
|
||||
try
|
||||
{
|
||||
fBrightness = Tessellator.class.getDeclaredField( "brightness" );
|
||||
this.fBrightness = Tessellator.class.getDeclaredField( "brightness" );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
fBrightness = Tessellator.class.getDeclaredField( "field_78401_l" );
|
||||
this.fBrightness = Tessellator.class.getDeclaredField( "field_78401_l" );
|
||||
}
|
||||
fBrightness.setAccessible( true );
|
||||
this.fBrightness.setAccessible( true );
|
||||
}
|
||||
return (Integer) fBrightness.get( Tessellator.instance );
|
||||
return (Integer) this.fBrightness.get( Tessellator.instance );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -204,90 +204,90 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
public void setTexture(IIcon ico)
|
||||
{
|
||||
lightState.rXPos = lightState.rXNeg = lightState.rYPos = lightState.rYNeg = lightState.rZPos = lightState.rZNeg = ico;
|
||||
this.lightState.rXPos = this.lightState.rXNeg = this.lightState.rYPos = this.lightState.rYNeg = this.lightState.rZPos = this.lightState.rZNeg = ico;
|
||||
}
|
||||
|
||||
public void setTexture(IIcon rYNeg, IIcon rYPos, IIcon rZNeg, IIcon rZPos, IIcon rXNeg, IIcon rXPos)
|
||||
{
|
||||
lightState.rXPos = rXPos;
|
||||
lightState.rXNeg = rXNeg;
|
||||
lightState.rYPos = rYPos;
|
||||
lightState.rYNeg = rYNeg;
|
||||
lightState.rZPos = rZPos;
|
||||
lightState.rZNeg = rZNeg;
|
||||
this.lightState.rXPos = rXPos;
|
||||
this.lightState.rXNeg = rXNeg;
|
||||
this.lightState.rYPos = rYPos;
|
||||
this.lightState.rYNeg = rYNeg;
|
||||
this.lightState.rZPos = rZPos;
|
||||
this.lightState.rZNeg = rZNeg;
|
||||
}
|
||||
|
||||
public boolean renderStandardBlockNoCalculations(Block b, int x, int y, int z)
|
||||
{
|
||||
Tessellator.instance.setBrightness( lightState.bXPos );
|
||||
restoreAO( lightState.aoXPos, lightState.foXPos );
|
||||
renderFaceXPos( b, x, y, z, useTextures ? lightState.rXPos : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.EAST.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bXPos );
|
||||
this.restoreAO( this.lightState.aoXPos, this.lightState.foXPos );
|
||||
this.renderFaceXPos( b, x, y, z, this.useTextures ? this.lightState.rXPos : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.EAST.ordinal() ) );
|
||||
|
||||
Tessellator.instance.setBrightness( lightState.bXNeg );
|
||||
restoreAO( lightState.aoXNeg, lightState.foXNeg );
|
||||
renderFaceXNeg( b, x, y, z, useTextures ? lightState.rXNeg : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.WEST.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bXNeg );
|
||||
this.restoreAO( this.lightState.aoXNeg, this.lightState.foXNeg );
|
||||
this.renderFaceXNeg( b, x, y, z, this.useTextures ? this.lightState.rXNeg : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.WEST.ordinal() ) );
|
||||
|
||||
Tessellator.instance.setBrightness( lightState.bYPos );
|
||||
restoreAO( lightState.aoYPos, lightState.foYPos );
|
||||
renderFaceYPos( b, x, y, z, useTextures ? lightState.rYPos : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.UP.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bYPos );
|
||||
this.restoreAO( this.lightState.aoYPos, this.lightState.foYPos );
|
||||
this.renderFaceYPos( b, x, y, z, this.useTextures ? this.lightState.rYPos : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.UP.ordinal() ) );
|
||||
|
||||
Tessellator.instance.setBrightness( lightState.bYNeg );
|
||||
restoreAO( lightState.aoYNeg, lightState.foYNeg );
|
||||
renderFaceYNeg( b, x, y, z, useTextures ? lightState.rYNeg : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.DOWN.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bYNeg );
|
||||
this.restoreAO( this.lightState.aoYNeg, this.lightState.foYNeg );
|
||||
this.renderFaceYNeg( b, x, y, z, this.useTextures ? this.lightState.rYNeg : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.DOWN.ordinal() ) );
|
||||
|
||||
Tessellator.instance.setBrightness( lightState.bZPos );
|
||||
restoreAO( lightState.aoZPos, lightState.foZPos );
|
||||
renderFaceZPos( b, x, y, z, useTextures ? lightState.rZPos : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.SOUTH.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bZPos );
|
||||
this.restoreAO( this.lightState.aoZPos, this.lightState.foZPos );
|
||||
this.renderFaceZPos( b, x, y, z, this.useTextures ? this.lightState.rZPos : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.SOUTH.ordinal() ) );
|
||||
|
||||
Tessellator.instance.setBrightness( lightState.bZNeg );
|
||||
restoreAO( lightState.aoZNeg, lightState.foZNeg );
|
||||
renderFaceZNeg( b, x, y, z, useTextures ? lightState.rZNeg : getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.NORTH.ordinal() ) );
|
||||
Tessellator.instance.setBrightness( this.lightState.bZNeg );
|
||||
this.restoreAO( this.lightState.aoZNeg, this.lightState.foZNeg );
|
||||
this.renderFaceZNeg( b, x, y, z, this.useTextures ? this.lightState.rZNeg : this.getBlockIcon( b, this.blockAccess, x, y, z, ForgeDirection.NORTH.ordinal() ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void restoreAO(int[] z, float[] c)
|
||||
{
|
||||
brightnessBottomLeft = z[0];
|
||||
brightnessBottomRight = z[1];
|
||||
brightnessTopLeft = z[2];
|
||||
brightnessTopRight = z[3];
|
||||
Tessellator.instance.setColorRGBA_I( z[4], (int) (opacity * 255) );
|
||||
this.brightnessBottomLeft = z[0];
|
||||
this.brightnessBottomRight = z[1];
|
||||
this.brightnessTopLeft = z[2];
|
||||
this.brightnessTopRight = z[3];
|
||||
Tessellator.instance.setColorRGBA_I( z[4], (int) (this.opacity * 255) );
|
||||
|
||||
colorRedTopLeft = c[0];
|
||||
colorGreenTopLeft = c[1];
|
||||
colorBlueTopLeft = c[2];
|
||||
colorRedBottomLeft = c[3];
|
||||
colorGreenBottomLeft = c[4];
|
||||
colorBlueBottomLeft = c[5];
|
||||
colorRedBottomRight = c[6];
|
||||
colorGreenBottomRight = c[7];
|
||||
colorBlueBottomRight = c[8];
|
||||
colorRedTopRight = c[9];
|
||||
colorGreenTopRight = c[10];
|
||||
colorBlueTopRight = c[11];
|
||||
this.colorRedTopLeft = c[0];
|
||||
this.colorGreenTopLeft = c[1];
|
||||
this.colorBlueTopLeft = c[2];
|
||||
this.colorRedBottomLeft = c[3];
|
||||
this.colorGreenBottomLeft = c[4];
|
||||
this.colorBlueBottomLeft = c[5];
|
||||
this.colorRedBottomRight = c[6];
|
||||
this.colorGreenBottomRight = c[7];
|
||||
this.colorBlueBottomRight = c[8];
|
||||
this.colorRedTopRight = c[9];
|
||||
this.colorGreenTopRight = c[10];
|
||||
this.colorBlueTopRight = c[11];
|
||||
}
|
||||
|
||||
private void saveAO(int[] z, float[] c)
|
||||
{
|
||||
z[0] = brightnessBottomLeft;
|
||||
z[1] = brightnessBottomRight;
|
||||
z[2] = brightnessTopLeft;
|
||||
z[3] = brightnessTopRight;
|
||||
z[4] = getCurrentColor();
|
||||
z[0] = this.brightnessBottomLeft;
|
||||
z[1] = this.brightnessBottomRight;
|
||||
z[2] = this.brightnessTopLeft;
|
||||
z[3] = this.brightnessTopRight;
|
||||
z[4] = this.getCurrentColor();
|
||||
|
||||
c[0] = colorRedTopLeft;
|
||||
c[1] = colorGreenTopLeft;
|
||||
c[2] = colorBlueTopLeft;
|
||||
c[3] = colorRedBottomLeft;
|
||||
c[4] = colorGreenBottomLeft;
|
||||
c[5] = colorBlueBottomLeft;
|
||||
c[6] = colorRedBottomRight;
|
||||
c[7] = colorGreenBottomRight;
|
||||
c[8] = colorBlueBottomRight;
|
||||
c[9] = colorRedTopRight;
|
||||
c[10] = colorGreenTopRight;
|
||||
c[11] = colorBlueTopRight;
|
||||
c[0] = this.colorRedTopLeft;
|
||||
c[1] = this.colorGreenTopLeft;
|
||||
c[2] = this.colorBlueTopLeft;
|
||||
c[3] = this.colorRedBottomLeft;
|
||||
c[4] = this.colorGreenBottomLeft;
|
||||
c[5] = this.colorBlueBottomLeft;
|
||||
c[6] = this.colorRedBottomRight;
|
||||
c[7] = this.colorGreenBottomRight;
|
||||
c[8] = this.colorBlueBottomRight;
|
||||
c[9] = this.colorRedTopRight;
|
||||
c[10] = this.colorGreenTopRight;
|
||||
c[11] = this.colorBlueTopRight;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -295,16 +295,16 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( calculations )
|
||||
if ( this.calculations )
|
||||
{
|
||||
lightState.lightHash = getLightingHash( blk, this.blockAccess, x, y, z );
|
||||
this.lightState.lightHash = this.getLightingHash( blk, this.blockAccess, x, y, z );
|
||||
return super.renderStandardBlock( blk, x, y, z );
|
||||
}
|
||||
else
|
||||
{
|
||||
enableAO = lightState.isAO;
|
||||
boolean out = renderStandardBlockNoCalculations( blk, x, y, z );
|
||||
enableAO = false;
|
||||
this.enableAO = this.lightState.isAO;
|
||||
boolean out = this.renderStandardBlockNoCalculations( blk, x, y, z );
|
||||
this.enableAO = false;
|
||||
return out;
|
||||
}
|
||||
}
|
||||
@@ -319,12 +319,12 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
@Override
|
||||
public void renderFaceXNeg(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.WEST ) )
|
||||
if ( this.faces.contains( ForgeDirection.WEST ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.WEST ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.WEST ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -341,13 +341,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( renderMaxY, renderMaxZ );
|
||||
this.partialLightingColoring( this.renderMaxY, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d4, d5 );
|
||||
partialLightingColoring( renderMaxY, renderMinZ );
|
||||
this.partialLightingColoring( this.renderMaxY, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d14, d3, d5 );
|
||||
partialLightingColoring( renderMinY, renderMinZ );
|
||||
this.partialLightingColoring( this.renderMinY, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d12, d14, d3, d6 );
|
||||
partialLightingColoring( renderMinY, renderMaxZ );
|
||||
this.partialLightingColoring( this.renderMinY, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d12, d15, d4, d6 );
|
||||
}
|
||||
else
|
||||
@@ -363,22 +363,22 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rXNeg = par8Icon;
|
||||
saveAO( lightState.aoXNeg, lightState.foXNeg );
|
||||
lightState.bXNeg = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rXNeg = par8Icon;
|
||||
this.saveAO( this.lightState.aoXNeg, this.lightState.foXNeg );
|
||||
this.lightState.bXNeg = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.EAST ) )
|
||||
if ( this.faces.contains( ForgeDirection.EAST ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.EAST ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.EAST ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -395,13 +395,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( 1.0 - renderMinY, renderMaxZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinY, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d12, d15, d4, d6 );
|
||||
partialLightingColoring( 1.0 - renderMinY, renderMinZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinY, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d12, d14, d3, d6 );
|
||||
partialLightingColoring( 1.0 - renderMaxY, renderMinZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxY, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d14, d3, d5 );
|
||||
partialLightingColoring( 1.0 - renderMaxY, renderMaxZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxY, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d4, d5 );
|
||||
}
|
||||
else
|
||||
@@ -417,50 +417,50 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rXPos = par8Icon;
|
||||
saveAO( lightState.aoXPos, lightState.foXPos );
|
||||
lightState.bXPos = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rXPos = par8Icon;
|
||||
this.saveAO( this.lightState.aoXPos, this.lightState.foXPos );
|
||||
this.lightState.bXPos = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
private void partialLightingColoring(double u, double v)
|
||||
{
|
||||
double rA = colorRedTopLeft * u + (1.0 - u) * colorRedTopRight;
|
||||
double rB = colorRedBottomLeft * u + (1.0 - u) * colorRedBottomRight;
|
||||
double rA = this.colorRedTopLeft * u + (1.0 - u) * this.colorRedTopRight;
|
||||
double rB = this.colorRedBottomLeft * u + (1.0 - u) * this.colorRedBottomRight;
|
||||
float r = (float) (rA * v + rB * (1.0 - v));
|
||||
|
||||
double gA = colorGreenTopLeft * u + (1.0 - u) * colorGreenTopRight;
|
||||
double gB = colorGreenBottomLeft * u + (1.0 - u) * colorGreenBottomRight;
|
||||
double gA = this.colorGreenTopLeft * u + (1.0 - u) * this.colorGreenTopRight;
|
||||
double gB = this.colorGreenBottomLeft * u + (1.0 - u) * this.colorGreenBottomRight;
|
||||
float g = (float) (gA * v + gB * (1.0 - v));
|
||||
|
||||
double bA = colorBlueTopLeft * u + (1.0 - u) * colorBlueTopRight;
|
||||
double bB = colorBlueBottomLeft * u + (1.0 - u) * colorBlueBottomRight;
|
||||
double bA = this.colorBlueTopLeft * u + (1.0 - u) * this.colorBlueTopRight;
|
||||
double bB = this.colorBlueBottomLeft * u + (1.0 - u) * this.colorBlueBottomRight;
|
||||
float b = (float) (bA * v + bB * (1.0 - v));
|
||||
|
||||
double highA = (brightnessTopLeft >> 16 & 255) * u + (1.0 - u) * (brightnessTopRight >> 16 & 255);
|
||||
double highB = (brightnessBottomLeft >> 16 & 255) * u + (1.0 - u) * (brightnessBottomRight >> 16 & 255);
|
||||
double highA = (this.brightnessTopLeft >> 16 & 255) * u + (1.0 - u) * (this.brightnessTopRight >> 16 & 255);
|
||||
double highB = (this.brightnessBottomLeft >> 16 & 255) * u + (1.0 - u) * (this.brightnessBottomRight >> 16 & 255);
|
||||
int high = ((int) (highA * v + highB * (1.0 - v))) & 255;
|
||||
|
||||
double lowA = ((brightnessTopLeft & 255)) * u + (1.0 - u) * ((brightnessTopRight & 255));
|
||||
double lowB = ((brightnessBottomLeft & 255)) * u + (1.0 - u) * ((brightnessBottomRight & 255));
|
||||
double lowA = ((this.brightnessTopLeft & 255)) * u + (1.0 - u) * ((this.brightnessTopRight & 255));
|
||||
double lowB = ((this.brightnessBottomLeft & 255)) * u + (1.0 - u) * ((this.brightnessBottomRight & 255));
|
||||
int low = ((int) (lowA * v + lowB * (1.0 - v))) & 255;
|
||||
|
||||
int out = (high << 16) | low;
|
||||
|
||||
Tessellator.instance.setColorRGBA_F( r, g, b, opacity );
|
||||
Tessellator.instance.setColorRGBA_F( r, g, b, this.opacity );
|
||||
Tessellator.instance.setBrightness( out );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.DOWN ) )
|
||||
if ( this.faces.contains( ForgeDirection.DOWN ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.DOWN ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.DOWN ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -477,13 +477,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( 1.0 - renderMinX, renderMaxZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinX, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d3, d6 );
|
||||
partialLightingColoring( 1.0 - renderMinX, renderMinZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinX, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d14, d3, d5 );
|
||||
partialLightingColoring( 1.0 - renderMaxX, renderMinZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxX, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d12, d13, d14, d4, d5 );
|
||||
partialLightingColoring( 1.0 - renderMaxX, renderMaxZ );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxX, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d12, d13, d15, d4, d6 );
|
||||
}
|
||||
else
|
||||
@@ -499,22 +499,22 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rYNeg = par8Icon;
|
||||
saveAO( lightState.aoYNeg, lightState.foYNeg );
|
||||
lightState.bYNeg = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rYNeg = par8Icon;
|
||||
this.saveAO( this.lightState.aoYNeg, this.lightState.foYNeg );
|
||||
this.lightState.bYNeg = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.UP ) )
|
||||
if ( this.faces.contains( ForgeDirection.UP ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.UP ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.UP ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -531,13 +531,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( this.renderMaxX, renderMaxZ );
|
||||
this.partialLightingColoring( this.renderMaxX, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d12, d13, d15, d4, d6 );
|
||||
partialLightingColoring( this.renderMaxX, renderMinZ );
|
||||
this.partialLightingColoring( this.renderMaxX, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d12, d13, d14, d4, d5 );
|
||||
partialLightingColoring( this.renderMinX, renderMinZ );
|
||||
this.partialLightingColoring( this.renderMinX, this.renderMinZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d14, d3, d5 );
|
||||
partialLightingColoring( this.renderMinX, renderMaxZ );
|
||||
this.partialLightingColoring( this.renderMinX, this.renderMaxZ );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d3, d6 );
|
||||
}
|
||||
else
|
||||
@@ -553,22 +553,22 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rYPos = par8Icon;
|
||||
saveAO( lightState.aoYPos, lightState.foYPos );
|
||||
lightState.bYPos = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rYPos = par8Icon;
|
||||
this.saveAO( this.lightState.aoYPos, this.lightState.foYPos );
|
||||
this.lightState.bYPos = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.NORTH ) )
|
||||
if ( this.faces.contains( ForgeDirection.NORTH ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.NORTH ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.NORTH ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -585,13 +585,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( renderMaxY, 1.0 - renderMinX );
|
||||
this.partialLightingColoring( this.renderMaxY, 1.0 - this.renderMinX );
|
||||
tessellator.addVertexWithUV( d11, d14, d15, d3, d5 );
|
||||
partialLightingColoring( renderMaxY, 1.0 - renderMaxX );
|
||||
this.partialLightingColoring( this.renderMaxY, 1.0 - this.renderMaxX );
|
||||
tessellator.addVertexWithUV( d12, d14, d15, d4, d5 );
|
||||
partialLightingColoring( renderMinY, 1.0 - renderMaxX );
|
||||
this.partialLightingColoring( this.renderMinY, 1.0 - this.renderMaxX );
|
||||
tessellator.addVertexWithUV( d12, d13, d15, d4, d6 );
|
||||
partialLightingColoring( renderMinY, 1.0 - renderMinX );
|
||||
this.partialLightingColoring( this.renderMinY, 1.0 - this.renderMinX );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d3, d6 );
|
||||
}
|
||||
else
|
||||
@@ -607,22 +607,22 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rZNeg = par8Icon;
|
||||
saveAO( lightState.aoZNeg, lightState.foZNeg );
|
||||
lightState.bZNeg = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rZNeg = par8Icon;
|
||||
this.saveAO( this.lightState.aoZNeg, this.lightState.foZNeg );
|
||||
this.lightState.bZNeg = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block par1Block, double par2, double par4, double par6, IIcon par8Icon)
|
||||
{
|
||||
if ( faces.contains( ForgeDirection.SOUTH ) )
|
||||
if ( this.faces.contains( ForgeDirection.SOUTH ) )
|
||||
{
|
||||
if ( !renderFaces.contains( ForgeDirection.SOUTH ) )
|
||||
if ( !this.renderFaces.contains( ForgeDirection.SOUTH ) )
|
||||
return;
|
||||
|
||||
if ( isFacade )
|
||||
if ( this.isFacade )
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -639,13 +639,13 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
|
||||
if ( this.enableAO )
|
||||
{
|
||||
partialLightingColoring( 1.0 - renderMinX, renderMaxY );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinX, this.renderMaxY );
|
||||
tessellator.addVertexWithUV( d11, d14, d15, d3, d5 );
|
||||
partialLightingColoring( 1.0 - renderMinX, renderMinY );
|
||||
this.partialLightingColoring( 1.0 - this.renderMinX, this.renderMinY );
|
||||
tessellator.addVertexWithUV( d11, d13, d15, d3, d6 );
|
||||
partialLightingColoring( 1.0 - renderMaxX, renderMinY );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxX, this.renderMinY );
|
||||
tessellator.addVertexWithUV( d12, d13, d15, d4, d6 );
|
||||
partialLightingColoring( 1.0 - renderMaxX, renderMaxY );
|
||||
this.partialLightingColoring( 1.0 - this.renderMaxX, this.renderMaxY );
|
||||
tessellator.addVertexWithUV( d12, d14, d15, d4, d5 );
|
||||
}
|
||||
else
|
||||
@@ -661,16 +661,16 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
else
|
||||
{
|
||||
lightState.isAO = enableAO;
|
||||
lightState.rZPos = par8Icon;
|
||||
saveAO( lightState.aoZPos, lightState.foZPos );
|
||||
lightState.bZPos = getCurrentBrightness();
|
||||
this.lightState.isAO = this.enableAO;
|
||||
this.lightState.rZPos = par8Icon;
|
||||
this.saveAO( this.lightState.aoZPos, this.lightState.foZPos );
|
||||
this.lightState.bZPos = this.getCurrentBrightness();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean similarLighting(Block blk, IBlockAccess w, int x, int y, int z, ISimplifiedBundle sim)
|
||||
{
|
||||
int lh = getLightingHash( blk, w, x, y, z );
|
||||
int lh = this.getLightingHash( blk, w, x, y, z );
|
||||
return ((LightingCache) sim).lightHash == lh;
|
||||
}
|
||||
|
||||
@@ -686,19 +686,19 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
for (int k = -1; k <= 1; k++)
|
||||
{
|
||||
|
||||
lightHashTmp[o++] = blk.getMixedBrightnessForBlock( this.blockAccess, x + i, y + j, z + k );
|
||||
this.lightHashTmp[o++] = blk.getMixedBrightnessForBlock( this.blockAccess, x + i, y + j, z + k );
|
||||
}
|
||||
|
||||
return Arrays.hashCode( lightHashTmp );
|
||||
return Arrays.hashCode( this.lightHashTmp );
|
||||
}
|
||||
|
||||
public void populate(ISimplifiedBundle sim)
|
||||
{
|
||||
lightState = new LightingCache( (LightingCache) sim );
|
||||
this.lightState = new LightingCache( (LightingCache) sim );
|
||||
}
|
||||
|
||||
public ISimplifiedBundle getLightingCache()
|
||||
{
|
||||
return new LightingCache( lightState );
|
||||
return new LightingCache( this.lightState );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,22 +40,22 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
private final int dspList;
|
||||
|
||||
public SpatialSkyRender() {
|
||||
dspList = GLAllocation.generateDisplayLists( 1 );
|
||||
this.dspList = GLAllocation.generateDisplayLists( 1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float partialTicks, WorldClient world, Minecraft mc)
|
||||
{
|
||||
long now = System.currentTimeMillis();
|
||||
if ( now - cycle > 2000 )
|
||||
if ( now - this.cycle > 2000 )
|
||||
{
|
||||
cycle = now;
|
||||
GL11.glNewList( dspList, GL11.GL_COMPILE );
|
||||
renderTwinkles();
|
||||
this.cycle = now;
|
||||
GL11.glNewList( this.dspList, GL11.GL_COMPILE );
|
||||
this.renderTwinkles();
|
||||
GL11.glEndList();
|
||||
}
|
||||
|
||||
float fade = now - cycle;
|
||||
float fade = now - this.cycle;
|
||||
fade /= 1000;
|
||||
fade = 0.15f * (1.0f - Math.abs( (fade - 1.0f) * (fade - 1.0f) ));
|
||||
|
||||
@@ -124,7 +124,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
GL11.glDepthMask( false );
|
||||
|
||||
GL11.glColor4f( fade, fade, fade, 1.0f );
|
||||
GL11.glCallList( dspList );
|
||||
GL11.glCallList( this.dspList );
|
||||
}
|
||||
|
||||
GL11.glPopAttrib();
|
||||
@@ -139,10 +139,10 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
|
||||
for (int i = 0; i < 50; ++i)
|
||||
{
|
||||
double iX = random.nextFloat() * 2.0F - 1.0F;
|
||||
double iY = random.nextFloat() * 2.0F - 1.0F;
|
||||
double iZ = random.nextFloat() * 2.0F - 1.0F;
|
||||
double d3 = 0.05F + random.nextFloat() * 0.1F;
|
||||
double iX = this.random.nextFloat() * 2.0F - 1.0F;
|
||||
double iY = this.random.nextFloat() * 2.0F - 1.0F;
|
||||
double iZ = this.random.nextFloat() * 2.0F - 1.0F;
|
||||
double d3 = 0.05F + this.random.nextFloat() * 0.1F;
|
||||
double dist = iX * iX + iY * iY + iZ * iZ;
|
||||
|
||||
if ( dist < 1.0D && dist > 0.01D )
|
||||
@@ -160,7 +160,7 @@ public class SpatialSkyRender extends IRenderHandler
|
||||
double d11 = Math.atan2( Math.sqrt( iX * iX + iZ * iZ ), iY );
|
||||
double d12 = Math.sin( d11 );
|
||||
double d13 = Math.cos( d11 );
|
||||
double d14 = random.nextDouble() * Math.PI * 2.0D;
|
||||
double d14 = this.random.nextDouble() * Math.PI * 2.0D;
|
||||
double d15 = Math.sin( d14 );
|
||||
double d16 = Math.cos( d14 );
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
final double MAX_DISTANCE;
|
||||
|
||||
public TESRWrapper(BaseBlockRender render) {
|
||||
blkRender = render;
|
||||
MAX_DISTANCE = blkRender.getTesrRenderDistance();
|
||||
this.blkRender = render;
|
||||
this.MAX_DISTANCE = this.blkRender.getTesrRenderDistance();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +56,7 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
|
||||
if ( b instanceof AEBaseBlock && ((AEBaseTile) te).requiresTESR() )
|
||||
{
|
||||
if ( Math.abs( x ) > MAX_DISTANCE || Math.abs( y ) > MAX_DISTANCE || Math.abs( z ) > MAX_DISTANCE )
|
||||
if ( Math.abs( x ) > this.MAX_DISTANCE || Math.abs( y ) > this.MAX_DISTANCE || Math.abs( z ) > this.MAX_DISTANCE )
|
||||
return;
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
@@ -69,8 +69,8 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
renderBlocksInstance.blockAccess = te.getWorldObj();
|
||||
blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, renderBlocksInstance );
|
||||
this.renderBlocksInstance.blockAccess = te.getWorldObj();
|
||||
this.blkRender.renderTile( (AEBaseBlock) b, (AEBaseTile) te, tess, x, y, z, f, this.renderBlocksInstance );
|
||||
|
||||
if ( Platform.isDrawing( tess ) )
|
||||
throw new RuntimeException( "Error during rendering." );
|
||||
|
||||
@@ -45,7 +45,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
||||
|
||||
void setRender(AEBaseBlock in, BaseBlockRender r)
|
||||
{
|
||||
blockRenders.put( in, r );
|
||||
this.blockRenders.put( in, r );
|
||||
}
|
||||
|
||||
private WorldRender() {
|
||||
@@ -62,7 +62,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
AEBaseBlock blk = (AEBaseBlock) block;
|
||||
renderer.setRenderBoundsFromBlock( block );
|
||||
return getRender( blk ).renderInWorld( blk, world, x, y, z, renderer );
|
||||
return this.getRender( blk ).renderInWorld( blk, world, x, y, z, renderer );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,7 +74,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
||||
@Override
|
||||
public int getRenderId()
|
||||
{
|
||||
return renderID;
|
||||
return this.renderID;
|
||||
}
|
||||
|
||||
public void renderItemBlock(ItemStack item, ItemRenderType type, Object[] data)
|
||||
@@ -83,17 +83,17 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
||||
if ( blk instanceof AEBaseBlock )
|
||||
{
|
||||
AEBaseBlock block = (AEBaseBlock) blk;
|
||||
renderer.setRenderBoundsFromBlock( block );
|
||||
this.renderer.setRenderBoundsFromBlock( block );
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
getRender( block ).renderInventory( block, item, renderer, type, data );
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
|
||||
this.getRender( block ).renderInventory( block, item, this.renderer, type, data );
|
||||
this.renderer.uvRotateBottom = this.renderer.uvRotateEast = this.renderer.uvRotateNorth = this.renderer.uvRotateSouth = this.renderer.uvRotateTop = this.renderer.uvRotateWest = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !hasError )
|
||||
if ( !this.hasError )
|
||||
{
|
||||
hasError = true;
|
||||
this.hasError = true;
|
||||
AELog.severe( "Invalid render - item/block mismatch" );
|
||||
AELog.severe( " item: " + item.getUnlocalizedName() );
|
||||
AELog.severe( " block: " + blk.getUnlocalizedName() );
|
||||
|
||||
@@ -80,42 +80,42 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
{
|
||||
IIcon texture = null;
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.WEST, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.WEST, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.0D, 0.5D - Thickness, 0.5D - Thickness, 0.5D - Thickness - pull, 0.5D + Thickness, 0.5D + Thickness );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.EAST, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.EAST, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.5D + Thickness + pull, 0.5D - Thickness, 0.5D - Thickness, 1.0D, 0.5D + Thickness, 0.5D + Thickness );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.NORTH, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.NORTH, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.5D - Thickness, 0.5D - Thickness, 0.0D, 0.5D + Thickness, 0.5D + Thickness, 0.5D - Thickness - pull );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.SOUTH, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.SOUTH, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.5D - Thickness, 0.5D - Thickness, 0.5D + Thickness + pull, 0.5D + Thickness, 0.5D + Thickness, 1.0D );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.DOWN, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.DOWN, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.5D - Thickness, 0.0D, 0.5D - Thickness, 0.5D + Thickness, 0.5D - Thickness - pull, 0.5D + Thickness );
|
||||
renderer.renderStandardBlock( block, x, y, z );
|
||||
}
|
||||
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = getConnectedCable( world, x, y, z, ForgeDirection.UP, covered ) );
|
||||
block.getRendererInstance().setTemporaryRenderIcon( texture = this.getConnectedCable( world, x, y, z, ForgeDirection.UP, covered ) );
|
||||
if ( texture != null )
|
||||
{
|
||||
renderer.setRenderBounds( 0.5D - Thickness, 0.5D + Thickness + pull, 0.5D - Thickness, 0.5D + Thickness, 1.0D, 0.5D + Thickness );
|
||||
@@ -134,44 +134,44 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
{
|
||||
renderer.setOverrideBlockTexture( blk.getIcon( 0, 0 ) );
|
||||
|
||||
setInvRenderBounds( renderer, 2, 14, 0, 14, 16, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 2, 14, 0, 14, 16, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 14, 2, 2, 16, 14 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 14, 2, 2, 16, 14 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 2, 0, 14, 14, 2, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 2, 0, 14, 14, 2, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 14, 0, 2, 16, 2, 14 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 14, 0, 2, 16, 2, 14 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 0, 0, 16, 2, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 0, 0, 16, 2, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 2, 0, 2, 16, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 2, 0, 2, 16, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 0, 2, 2, 2, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 0, 2, 2, 2, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 14, 14, 16, 16, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 14, 14, 16, 16, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 14, 0, 14, 16, 14, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 14, 0, 14, 16, 14, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 14, 14, 0, 16, 16, 14 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 14, 14, 0, 16, 16, 14 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 14, 2, 0, 16, 14, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 14, 2, 0, 16, 14, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 2, 14, 2, 14, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 2, 14, 2, 14, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 1, 1, 1, 15, 15, 15 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 1, 1, 1, 15, 15, 15 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, Tessellator.instance, 0xffffff, renderer );
|
||||
|
||||
renderer.setOverrideBlockTexture( null );
|
||||
}
|
||||
@@ -186,7 +186,7 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
{
|
||||
if ( tma.isPowered() )
|
||||
{
|
||||
renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, ForgeDirection.WEST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
TaughtIcon lights = new TaughtIcon( ExtraBlockTextures.BlockMolecularAssemblerLights.getIcon(), -2.0f );
|
||||
Tessellator.instance.setColorRGBA_F( 1, 1, 1, 0.3f );
|
||||
Tessellator.instance.setBrightness( 14 << 20 | 14 << 4 );
|
||||
@@ -204,12 +204,12 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
BusRenderer.instance.renderer.blockAccess = renderer.blockAccess;
|
||||
renderer = BusRenderer.instance.renderer;
|
||||
|
||||
preRenderInWorld( block, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
tma.lightCache = BusRenderHelper.instance.useSimplifiedRendering( x, y, z, this, tma.lightCache );
|
||||
|
||||
BusRenderer.instance.renderer.isFacade = true;
|
||||
IOrientable te = getOrientable( block, world, x, y, z );
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
ForgeDirection fdz = te.getForward();
|
||||
@@ -217,49 +217,49 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
renderCableAt( 0.11D, world, x, y, z, block, renderer, 0.141D, false );
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, 0.1875D, true );
|
||||
this.renderCableAt( 0.11D, world, x, y, z, block, renderer, 0.141D, false );
|
||||
this.renderCableAt( 0.188D, world, x, y, z, block, renderer, 0.1875D, true );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( blk.getIcon( 0, 0 ) );
|
||||
|
||||
renderBlockBounds( renderer, 2, 14, 0, 14, 16, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 2, 14, 0, 14, 16, 2, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 14, 2, 2, 16, 14, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 14, 2, 2, 16, 14, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 2, 0, 14, 14, 2, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 2, 0, 14, 14, 2, 16, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 14, 0, 2, 16, 2, 14, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 14, 0, 2, 16, 2, 14, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
// sides...
|
||||
renderBlockBounds( renderer, 0, 0, 0, 16, 2, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 0, 0, 16, 2, 2, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 2, 0, 2, 16, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 2, 0, 2, 16, 2, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 0, 2, 2, 2, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 0, 2, 2, 2, 16, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 14, 14, 16, 16, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 14, 14, 16, 16, 16, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 14, 0, 14, 16, 14, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 14, 0, 14, 16, 14, 16, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 14, 14, 0, 16, 16, 14, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 14, 14, 0, 16, 16, 14, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 14, 2, 0, 16, 14, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 14, 2, 0, 16, 14, 2, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 2, 14, 2, 14, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 2, 14, 2, 14, 16, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 1, 1, 1, 15, 15, 15, fdx, fdy, fdz );
|
||||
renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
BusRenderHelper.instance.normalRendering();
|
||||
@@ -269,7 +269,7 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
renderer.renderAllFaces = false;
|
||||
BusRenderer.instance.renderer.isFacade = false;
|
||||
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,26 +55,26 @@ public class RenderBlockCharger extends BaseBlockRender
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null, null );
|
||||
|
||||
setInvRenderBounds( renderer, 2, 0, 2, 14, 3, 14 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 2, 0, 2, 14, 3, 14 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 3, 3, 3, 13, 4, 13 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 3, 3, 3, 13, 4, 13 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( null, ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null );
|
||||
|
||||
setInvRenderBounds( renderer, 2, 13, 2, 14, 16, 14 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 2, 13, 2, 14, 16, 14 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 3, 12, 3, 13, 13, 13 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 3, 12, 3, 13, 13, 13 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.renderAllFaces = false;
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
@@ -84,42 +84,42 @@ public class RenderBlockCharger extends BaseBlockRender
|
||||
@Override
|
||||
public boolean renderInWorld(AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
preRenderInWorld( block, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
BlockCharger blk = (BlockCharger) block;
|
||||
|
||||
IOrientable te = getOrientable( block, world, x, y, z );
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
ForgeDirection fdz = te.getForward();
|
||||
ForgeDirection fdx = Platform.crossProduct( fdz, fdy ).getOpposite();
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
renderBlockBounds( renderer, 6, 1, 0, 10, 15, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 6, 1, 0, 10, 15, 2, fdx, fdy, fdz );
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null, null );
|
||||
|
||||
renderBlockBounds( renderer, 2, 0, 2, 14, 3, 14, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 2, 0, 2, 14, 3, 14, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 3, 3, 3, 13, 4, 13, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 3, 3, 3, 13, 4, 13, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcons( null, ExtraBlockTextures.BlockChargerInside.getIcon(), null, null, null, null );
|
||||
|
||||
renderBlockBounds( renderer, 2, 13, 2, 14, 16, 14, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 2, 13, 2, 14, 16, 14, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 3, 12, 3, 13, 13, 13, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 3, 12, 3, 13, 13, 13, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderer.renderAllFaces = false;
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class RenderBlockCharger extends BaseBlockRender
|
||||
if ( sis != null )
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -160,7 +160,7 @@ public class RenderBlockCharger extends BaseBlockRender
|
||||
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||
tess.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
|
||||
|
||||
doRenderItem( sis, tile );
|
||||
this.doRenderItem( sis, tile );
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
||||
@@ -38,9 +38,9 @@ public class RenderBlockController extends BaseBlockRender
|
||||
public boolean renderInWorld(AEBaseBlock blk, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
|
||||
boolean xx = getTileEntity( world, x - 1, y, z ) instanceof TileController && getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
boolean yy = getTileEntity( world, x, y - 1, z ) instanceof TileController && getTileEntity( world, x, y + 1, z ) instanceof TileController;
|
||||
boolean zz = getTileEntity( world, x, y, z - 1 ) instanceof TileController && getTileEntity( world, x, y, z + 1 ) instanceof TileController;
|
||||
boolean xx = this.getTileEntity( world, x - 1, y, z ) instanceof TileController && this.getTileEntity( world, x + 1, y, z ) instanceof TileController;
|
||||
boolean yy = this.getTileEntity( world, x, y - 1, z ) instanceof TileController && this.getTileEntity( world, x, y + 1, z ) instanceof TileController;
|
||||
boolean zz = this.getTileEntity( world, x, y, z - 1 ) instanceof TileController && this.getTileEntity( world, x, y, z + 1 ) instanceof TileController;
|
||||
|
||||
int meta = world.getBlockMetadata( x, y, z );
|
||||
boolean hasPower = meta > 0;
|
||||
|
||||
@@ -90,35 +90,35 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
|
||||
}
|
||||
|
||||
float highX = isConnected( w, x, y, z, ForgeDirection.EAST ) ? 16 : 13.01f;
|
||||
float lowX = isConnected( w, x, y, z, ForgeDirection.WEST ) ? 0 : 2.99f;
|
||||
float highX = this.isConnected( w, x, y, z, ForgeDirection.EAST ) ? 16 : 13.01f;
|
||||
float lowX = this.isConnected( w, x, y, z, ForgeDirection.WEST ) ? 0 : 2.99f;
|
||||
|
||||
float highY = isConnected( w, x, y, z, ForgeDirection.UP ) ? 16 : 13.01f;
|
||||
float lowY = isConnected( w, x, y, z, ForgeDirection.DOWN ) ? 0 : 2.99f;
|
||||
float highY = this.isConnected( w, x, y, z, ForgeDirection.UP ) ? 16 : 13.01f;
|
||||
float lowY = this.isConnected( w, x, y, z, ForgeDirection.DOWN ) ? 0 : 2.99f;
|
||||
|
||||
float highZ = isConnected( w, x, y, z, ForgeDirection.SOUTH ) ? 16 : 13.01f;
|
||||
float lowZ = isConnected( w, x, y, z, ForgeDirection.NORTH ) ? 0 : 2.99f;
|
||||
float highZ = this.isConnected( w, x, y, z, ForgeDirection.SOUTH ) ? 16 : 13.01f;
|
||||
float lowZ = this.isConnected( w, x, y, z, ForgeDirection.NORTH ) ? 0 : 2.99f;
|
||||
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.UP, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
this.renderCorner( i, renderer, w, x, y, z, ForgeDirection.DOWN, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
i.setBounds( fso( side, lowX, ForgeDirection.WEST ), fso( side, lowY, ForgeDirection.DOWN ), fso( side, lowZ, ForgeDirection.NORTH ),
|
||||
fso( side, highX, ForgeDirection.EAST ), fso( side, highY, ForgeDirection.UP ), fso( side, highZ, ForgeDirection.SOUTH ) );
|
||||
i.setBounds( this.fso( side, lowX, ForgeDirection.WEST ), this.fso( side, lowY, ForgeDirection.DOWN ), this.fso( side, lowZ, ForgeDirection.NORTH ),
|
||||
this.fso( side, highX, ForgeDirection.EAST ), this.fso( side, highY, ForgeDirection.UP ), this.fso( side, highZ, ForgeDirection.SOUTH ) );
|
||||
i.prepareBounds( renderer );
|
||||
|
||||
boolean LocalEmit = emitsLight;
|
||||
if ( blk instanceof BlockCraftingMonitor && !ct.getForward().equals( side ) )
|
||||
LocalEmit = false;
|
||||
|
||||
handleSide( blk, meta, x, y, z, i, renderer, ct.getForward().equals( side ) ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
|
||||
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward().equals( side ) ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
|
||||
}
|
||||
|
||||
BusRenderer.instance.renderer.isFacade = false;
|
||||
@@ -140,15 +140,15 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
private void renderCorner(BusRenderHelper i, RenderBlocks renderer, IBlockAccess w, int x, int y, int z, ForgeDirection up, ForgeDirection east,
|
||||
ForgeDirection south)
|
||||
{
|
||||
if ( isConnected( w, x, y, z, up ) )
|
||||
if ( this.isConnected( w, x, y, z, up ) )
|
||||
return;
|
||||
if ( isConnected( w, x, y, z, east ) )
|
||||
if ( this.isConnected( w, x, y, z, east ) )
|
||||
return;
|
||||
if ( isConnected( w, x, y, z, south ) )
|
||||
if ( this.isConnected( w, x, y, z, south ) )
|
||||
return;
|
||||
|
||||
i.setBounds( gso( east, 3, ForgeDirection.WEST ), gso( up, 3, ForgeDirection.DOWN ), gso( south, 3, ForgeDirection.NORTH ),
|
||||
gso( east, 13, ForgeDirection.EAST ), gso( up, 13, ForgeDirection.UP ), gso( south, 13, ForgeDirection.SOUTH ) );
|
||||
i.setBounds( this.gso( east, 3, ForgeDirection.WEST ), this.gso( up, 3, ForgeDirection.DOWN ), this.gso( south, 3, ForgeDirection.NORTH ),
|
||||
this.gso( east, 13, ForgeDirection.EAST ), this.gso( up, 13, ForgeDirection.UP ), this.gso( south, 13, ForgeDirection.SOUTH ) );
|
||||
i.prepareBounds( renderer );
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRing.getIcon() );
|
||||
i.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
@@ -179,7 +179,7 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
private void handleSide(AEBaseBlock blk, int meta, int x, int y, int z, BusRenderHelper i, RenderBlocks renderer, IIcon color, boolean emitsLight,
|
||||
boolean isMonitor, ForgeDirection side, IBlockAccess w)
|
||||
{
|
||||
if ( isConnected( w, x, y, z, side ) )
|
||||
if ( this.isConnected( w, x, y, z, side ) )
|
||||
return;
|
||||
|
||||
i.setFacesToRender( EnumSet.of( side ) );
|
||||
|
||||
@@ -72,7 +72,7 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
|
||||
{
|
||||
cmt.updateList = false;
|
||||
GL11.glNewList( cmt.dspList, GL11.GL_COMPILE_AND_EXECUTE );
|
||||
tesrRenderScreen( tess, cmt, ais );
|
||||
this.tesrRenderScreen( tess, cmt, ais );
|
||||
GL11.glEndList();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -79,7 +79,7 @@ public class RenderBlockCrank extends BaseBlockRender
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
|
||||
GL11.glTranslated( 0.5, 0, 0.5 );
|
||||
GL11.glRotatef( tc.visibleRotation, 0, 1, 0 );
|
||||
|
||||
@@ -59,33 +59,33 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 6, 1, 0, 10, 15, 2 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
// sides...
|
||||
setInvRenderBounds( renderer, 3, 1, 0, 13, 15, 3 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 3, 1, 0, 13, 15, 3 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 0, 1, 0, 3, 15, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 0, 1, 0, 3, 15, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 13, 1, 0, 16, 15, 16 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 13, 1, 0, 16, 15, 16 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 1, 0, 1, 15, 2, 15 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 1, 0, 1, 15, 2, 15 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 1, 14, 1, 15, 16, 15 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 1, 14, 1, 15, 16, 15 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockInscriberInside.getIcon() );
|
||||
|
||||
// press
|
||||
setInvRenderBounds( renderer, 3, 2, 3, 13, 3, 13 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 3, 2, 3, 13, 3, 13 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
setInvRenderBounds( renderer, 3, 13, 3, 13, 15, 13 );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.setInvRenderBounds( renderer, 3, 13, 3, 13, 15, 13 );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
@@ -97,11 +97,11 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
@Override
|
||||
public boolean renderInWorld(AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
|
||||
{
|
||||
preRenderInWorld( block, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( block, world, x, y, z, renderer );
|
||||
|
||||
BlockInscriber blk = (BlockInscriber) block;
|
||||
|
||||
IOrientable te = getOrientable( block, world, x, y, z );
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
ForgeDirection fdz = te.getForward();
|
||||
@@ -110,20 +110,20 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
// sides...
|
||||
renderBlockBounds( renderer, 3, 1, 0, 13, 15, 3, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 3, 1, 0, 13, 15, 3, fdx, fdy, fdz );
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 0, 1, 0, 3, 15, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 0, 1, 0, 3, 15, 16, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 13, 1, 0, 16, 15, 16, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 13, 1, 0, 16, 15, 16, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
// top bottom..
|
||||
renderBlockBounds( renderer, 1, 0, 1, 15, 4, 15, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 1, 0, 1, 15, 4, 15, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
renderBlockBounds( renderer, 1, 12, 1, 15, 16, 15, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 1, 12, 1, 15, 16, 15, fdx, fdy, fdz );
|
||||
out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
@@ -131,7 +131,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
renderer.renderAllFaces = false;
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
TileInscriber inv = (TileInscriber) tile;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
@@ -225,13 +225,13 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
is = ir.output.copy();
|
||||
}
|
||||
|
||||
renderItem( is, 0.0f, block, tile, tess, x, y, z, f, renderer );
|
||||
this.renderItem( is, 0.0f, block, tile, tess, x, y, z, f, renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
renderItem( inv.getStackInSlot( 0 ), press, block, tile, tess, x, y, z, f, renderer );
|
||||
renderItem( inv.getStackInSlot( 1 ), -press, block, tile, tess, x, y, z, f, renderer );
|
||||
renderItem( inv.getStackInSlot( 2 ), 0.0f, block, tile, tess, x, y, z, f, renderer );
|
||||
this.renderItem( inv.getStackInSlot( 0 ), press, block, tile, tess, x, y, z, f, renderer );
|
||||
this.renderItem( inv.getStackInSlot( 1 ), -press, block, tile, tess, x, y, z, f, renderer );
|
||||
this.renderItem( inv.getStackInSlot( 2 ), 0.0f, block, tile, tess, x, y, z, f, renderer );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -243,7 +243,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
{
|
||||
sis = sis.copy();
|
||||
GL11.glPushMatrix();
|
||||
applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
this.applyTESRRotation( x, y, z, tile.getForward(), tile.getUp() );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -272,7 +272,7 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||
tess.setColorOpaque_F( 1.0f, 1.0f, 1.0f );
|
||||
|
||||
doRenderItem( sis, tile );
|
||||
this.doRenderItem( sis, tile );
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
|
||||
@@ -62,9 +62,9 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
GL11.glScalef( 1.0F, -1F, -1F );
|
||||
GL11.glTranslatef( -0.0F, -1.0F, -1.0F );
|
||||
|
||||
model.chestLid.offsetY = -(0.9f / 16.0f);
|
||||
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
model.renderAll();
|
||||
this.model.chestLid.offsetY = -(0.9f / 16.0f);
|
||||
this.model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
this.model.renderAll();
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
@@ -122,9 +122,9 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
lidAngle = 1.0F - lidAngle;
|
||||
lidAngle = 1.0F - lidAngle * lidAngle * lidAngle;
|
||||
|
||||
model.chestLid.offsetY = -(1.01f / 16.0f);
|
||||
model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
model.renderAll();
|
||||
this.model.chestLid.offsetY = -(1.01f / 16.0f);
|
||||
this.model.chestLid.rotateAngleX = -((lidAngle * 3.141593F) / 2.0F);
|
||||
this.model.renderAll();
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
@@ -119,7 +119,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
if ( cr.spin )
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -127,27 +127,27 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
{
|
||||
float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
float adjustment = (float) Math.PI * 0.74f;
|
||||
model.renderAll( (float) flipidiy( cr.rad + offRads + adjustment ) );
|
||||
this.model.renderAll( (float) this.flipidiy( cr.rad + offRads + adjustment ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
float offRads = rYaw / 180.0f * (float) Math.PI;
|
||||
float adjustment = (float) Math.PI * -0.74f;
|
||||
model.renderAll( (float) flipidiy( cr.rad + offRads + adjustment ) );
|
||||
this.model.renderAll( (float) this.flipidiy( cr.rad + offRads + adjustment ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
now = now % 1000000;
|
||||
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
this.model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
@@ -196,16 +196,16 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
if ( cr.spin )
|
||||
{
|
||||
now = now % 100000;
|
||||
model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
this.model.renderAll( (now / 50000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
else
|
||||
model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? flipidiy( cr.rad ) : cr.rad) );
|
||||
this.model.renderAll( (float) (skyCompass.getForward() == ForgeDirection.DOWN ? this.flipidiy( cr.rad ) : cr.rad) );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
now = now % 1000000;
|
||||
model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
this.model.renderAll( (now / 500000.0f) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
|
||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
||||
|
||||
@@ -48,11 +48,11 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
public void renderInventory(AEBaseBlock blk, ItemStack is, RenderBlocks renderer, ItemRenderType type, Object[] obj)
|
||||
{
|
||||
this.blk = blk;
|
||||
centerX = 0;
|
||||
centerY = 0;
|
||||
centerZ = 0;
|
||||
hasChan = false;
|
||||
hasPower = false;
|
||||
this.centerX = 0;
|
||||
this.centerY = 0;
|
||||
this.centerZ = 0;
|
||||
this.hasChan = false;
|
||||
this.hasPower = false;
|
||||
BlockRenderInfo ri = blk.getRendererInstance();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
@@ -60,17 +60,17 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
IIcon r = CableBusTextures.PartMonitorSidesStatus.getIcon();
|
||||
ri.setTemporaryRenderIcons( r, r, CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), r, r );
|
||||
renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
r = CableBusTextures.PartWirelessSides.getIcon();
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
tess.startDrawingQuads();
|
||||
ri.setTemporaryRenderIcon( null );
|
||||
renderTorchAtAngle( renderer, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderTorchAtAngle( renderer, ForgeDirection.EAST, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
super.postRenderInWorld( renderer );
|
||||
tess.draw();
|
||||
|
||||
@@ -82,22 +82,22 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
for (ForgeDirection side : sides)
|
||||
{
|
||||
renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 2 : -2), 8 + (side.offsetY != 0 ? side.offsetY * 2 : -2), 2
|
||||
this.renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 2 : -2), 8 + (side.offsetY != 0 ? side.offsetY * 2 : -2), 2
|
||||
+ (side.offsetZ != 0 ? side.offsetZ * 2 : -1) + s, 8 + (side.offsetX != 0 ? side.offsetX * 4 : 2),
|
||||
8 + (side.offsetY != 0 ? side.offsetY * 4 : 2), 2 + (side.offsetZ != 0 ? side.offsetZ * 5 : 1) + s, ForgeDirection.EAST, ForgeDirection.UP,
|
||||
ForgeDirection.SOUTH );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
}
|
||||
|
||||
s = 3;
|
||||
for (ForgeDirection side : sides)
|
||||
{
|
||||
renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 4 : -1), 8 + (side.offsetY != 0 ? side.offsetY * 4 : -1), 1
|
||||
this.renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 4 : -1), 8 + (side.offsetY != 0 ? side.offsetY * 4 : -1), 1
|
||||
+ (side.offsetZ != 0 ? side.offsetZ * 4 : -1) + s, 8 + (side.offsetX != 0 ? side.offsetX * 5 : 1),
|
||||
8 + (side.offsetY != 0 ? side.offsetY * 5 : 1), 2 + (side.offsetZ != 0 ? side.offsetZ * 5 : 1) + s, ForgeDirection.EAST, ForgeDirection.UP,
|
||||
ForgeDirection.SOUTH );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,8 +115,8 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
this.blk = blk;
|
||||
if ( tw != null )
|
||||
{
|
||||
hasChan = (tw.clientFlags & (TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG)) == (TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG);
|
||||
hasPower = (tw.clientFlags & TileWireless.POWERED_FLAG) == TileWireless.POWERED_FLAG;
|
||||
this.hasChan = (tw.clientFlags & (TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG)) == (TileWireless.POWERED_FLAG | TileWireless.CHANNEL_FLAG);
|
||||
this.hasPower = (tw.clientFlags & TileWireless.POWERED_FLAG) == TileWireless.POWERED_FLAG;
|
||||
|
||||
BlockRenderInfo ri = blk.getRendererInstance();
|
||||
|
||||
@@ -128,20 +128,20 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
IIcon r = CableBusTextures.PartMonitorSidesStatus.getIcon();
|
||||
ri.setTemporaryRenderIcons( r, r, CableBusTextures.PartMonitorSides.getIcon(), CableBusTextures.PartMonitorSides.getIcon(), r, r );
|
||||
renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
|
||||
r = CableBusTextures.PartWirelessSides.getIcon();
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 5, 5, 1, 11, 11, 2, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
|
||||
centerX = x;
|
||||
centerY = y;
|
||||
centerZ = z;
|
||||
this.centerX = x;
|
||||
this.centerY = y;
|
||||
this.centerZ = z;
|
||||
ri.setTemporaryRenderIcon( null );
|
||||
|
||||
renderTorchAtAngle( renderer, fdx, fdy, fdz );
|
||||
this.renderTorchAtAngle( renderer, fdx, fdy, fdz );
|
||||
super.postRenderInWorld( renderer );
|
||||
|
||||
ri.setTemporaryRenderIcons( r, r, ExtraBlockTextures.BlockWirelessInside.getIcon(), ExtraBlockTextures.BlockWirelessInside.getIcon(), r, r );
|
||||
@@ -152,7 +152,7 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
for (ForgeDirection side : sides)
|
||||
{
|
||||
renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 2 : -2), 8 + (side.offsetY != 0 ? side.offsetY * 2 : -2), 2
|
||||
this.renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 2 : -2), 8 + (side.offsetY != 0 ? side.offsetY * 2 : -2), 2
|
||||
+ (side.offsetZ != 0 ? side.offsetZ * 2 : -1) + s, 8 + (side.offsetX != 0 ? side.offsetX * 4 : 2),
|
||||
8 + (side.offsetY != 0 ? side.offsetY * 4 : 2), 2 + (side.offsetZ != 0 ? side.offsetZ * 5 : 1) + s, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
@@ -161,7 +161,7 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
s = 3;
|
||||
for (ForgeDirection side : sides)
|
||||
{
|
||||
renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 4 : -1), 8 + (side.offsetY != 0 ? side.offsetY * 4 : -1), 1
|
||||
this.renderBlockBounds( renderer, 8 + (side.offsetX != 0 ? side.offsetX * 4 : -1), 8 + (side.offsetY != 0 ? side.offsetY * 4 : -1), 1
|
||||
+ (side.offsetZ != 0 ? side.offsetZ * 4 : -1) + s, 8 + (side.offsetX != 0 ? side.offsetX * 5 : 1),
|
||||
8 + (side.offsetY != 0 ? side.offsetY * 5 : 1), 2 + (side.offsetZ != 0 ? side.offsetZ * 5 : 1) + s, fdx, fdy, fdz );
|
||||
super.renderInWorld( blk, world, x, y, z, renderer );
|
||||
@@ -170,15 +170,15 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
r = CableBusTextures.PartMonitorSidesStatusLights.getIcon();
|
||||
// ri.setTemporaryRenderIcons( r, r, ExtraTextures.BlockChargerInside.getIcon(),
|
||||
// ExtraTextures.BlockChargerInside.getIcon(), r, r );
|
||||
renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, fdx, fdy, fdz );
|
||||
this.renderBlockBounds( renderer, 5, 5, 0, 11, 11, 1, fdx, fdy, fdz );
|
||||
|
||||
if ( hasChan )
|
||||
if ( this.hasChan )
|
||||
{
|
||||
int l = 14;
|
||||
Tessellator.instance.setBrightness( l << 20 | l << 4 );
|
||||
Tessellator.instance.setColorOpaque_I( AEColor.Transparent.blackVariant );
|
||||
}
|
||||
else if ( hasPower )
|
||||
else if ( this.hasPower )
|
||||
{
|
||||
int l = 9;
|
||||
Tessellator.instance.setBrightness( l << 20 | l << 4 );
|
||||
@@ -212,7 +212,7 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
|
||||
private void renderTorchAtAngle(RenderBlocks renderer, ForgeDirection x, ForgeDirection y, ForgeDirection z)
|
||||
{
|
||||
IIcon r = (hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : blk.getIcon( 0, 0 ));
|
||||
IIcon r = (this.hasChan ? CableBusTextures.BlockWirelessOn.getIcon() : this.blk.getIcon( 0, 0 ));
|
||||
IIcon sides = new OffsetIcon( r, 0.0f, -2.0f );
|
||||
|
||||
switch (z)
|
||||
@@ -252,15 +252,15 @@ public class RenderBlockWireless extends BaseBlockRender
|
||||
}
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||
renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, y.getOpposite() );
|
||||
this.renderBlockBounds( renderer, 0, 7, 1, 16, 9, 16, x, y, z );
|
||||
this.renderFace( this.centerX, this.centerY, this.centerZ, this.blk, sides, renderer, y );
|
||||
this.renderFace( this.centerX, this.centerY, this.centerZ, this.blk, sides, renderer, y.getOpposite() );
|
||||
|
||||
renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x );
|
||||
renderFace( centerX, centerY, centerZ, blk, sides, renderer, x.getOpposite() );
|
||||
this.renderBlockBounds( renderer, 7, 0, 1, 9, 16, 16, x, y, z );
|
||||
this.renderFace( this.centerX, this.centerY, this.centerZ, this.blk, sides, renderer, x );
|
||||
this.renderFace( this.centerX, this.centerY, this.centerZ, this.blk, sides, renderer, x.getOpposite() );
|
||||
|
||||
renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
|
||||
renderFace( centerX, centerY, centerZ, blk, r, renderer, z );
|
||||
this.renderBlockBounds( renderer, 7, 7, 1, 9, 9, 10.6, x, y, z );
|
||||
this.renderFace( this.centerX, this.centerY, this.centerZ, this.blk, r, renderer, z );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class RenderDrive extends BaseBlockRender
|
||||
for (int xx = 0; xx < 2; xx++)
|
||||
{
|
||||
int stat = sp.getCellStatus( yy * 2 + (1 - xx) );
|
||||
selectFace( renderer, west, up, forward, 2 + xx * 7, 7 + xx * 7, 1 + yy * 3, 3 + yy * 3 );
|
||||
this.selectFace( renderer, west, up, forward, 2 + xx * 7, 7 + xx * 7, 1 + yy * 3, 3 + yy * 3 );
|
||||
|
||||
int spin = 0;
|
||||
|
||||
@@ -249,9 +249,9 @@ public class RenderDrive extends BaseBlockRender
|
||||
}
|
||||
|
||||
if ( (forward == ForgeDirection.UP && up == ForgeDirection.SOUTH) || forward == ForgeDirection.DOWN )
|
||||
selectFace( renderer, west, up, forward, 3 + xx * 7, 4 + xx * 7, 1 + yy * 3, 2 + yy * 3 );
|
||||
this.selectFace( renderer, west, up, forward, 3 + xx * 7, 4 + xx * 7, 1 + yy * 3, 2 + yy * 3 );
|
||||
else
|
||||
selectFace( renderer, west, up, forward, 5 + xx * 7, 6 + xx * 7, 2 + yy * 3, 3 + yy * 3 );
|
||||
this.selectFace( renderer, west, up, forward, 5 + xx * 7, 6 + xx * 7, 2 + yy * 3, 3 + yy * 3 );
|
||||
|
||||
if ( stat != 0 )
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class RenderMEChest extends BaseBlockRender
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.SOUTH ), block, is, Tessellator.instance, 0x000000, renderer );
|
||||
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.UP ), block, is, Tessellator.instance, adjustBrightness( AEColor.Transparent.whiteVariant, 0.7 ),
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.UP ), block, is, Tessellator.instance, this.adjustBrightness( AEColor.Transparent.whiteVariant, 0.7 ),
|
||||
renderer );
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
@@ -70,12 +70,12 @@ public class RenderMEChest extends BaseBlockRender
|
||||
ForgeDirection forward = sp.getForward();
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
int stat = sp.getCellStatus( 0 );
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
selectFace( renderer, west, up, forward, 5, 16 - 5, 9, 12 );
|
||||
this.selectFace( renderer, west, up, forward, 5, 16 - 5, 9, 12 );
|
||||
|
||||
int offsetU = -4;
|
||||
int offsetV = 8;
|
||||
@@ -105,7 +105,7 @@ public class RenderMEChest extends BaseBlockRender
|
||||
* forward == ForgeDirection.NORTH && up == ForgeDirection.UP ) flippableIcon.setFlip( true, false );
|
||||
*/
|
||||
|
||||
renderFace( x, y, z, imb, flippableIcon, renderer, forward );
|
||||
this.renderFace( x, y, z, imb, flippableIcon, renderer, forward );
|
||||
|
||||
if ( stat != 0 )
|
||||
{
|
||||
@@ -122,8 +122,8 @@ public class RenderMEChest extends BaseBlockRender
|
||||
Tessellator.instance.setColorOpaque_I( 0xffaa00 );
|
||||
if ( stat == 3 )
|
||||
Tessellator.instance.setColorOpaque_I( 0xff0000 );
|
||||
selectFace( renderer, west, up, forward, 9, 10, 11, 12 );
|
||||
renderFace( x, y, z, imb, ExtraBlockTextures.White.getIcon(), renderer, forward );
|
||||
this.selectFace( renderer, west, up, forward, 9, 10, 11, 12 );
|
||||
this.renderFace( x, y, z, imb, ExtraBlockTextures.White.getIcon(), renderer, forward );
|
||||
}
|
||||
|
||||
b = world.getLightBrightnessForSkyBlocks( x + up.offsetX, y + up.offsetY, z + up.offsetZ, 0 );
|
||||
@@ -140,21 +140,21 @@ public class RenderMEChest extends BaseBlockRender
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().whiteVariant );
|
||||
IIcon ico = ch == null ? null : ch.getTopTexture_Light();
|
||||
renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
|
||||
if ( ico != null )
|
||||
{
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().mediumVariant );
|
||||
ico = ch == null ? null : ch.getTopTexture_Medium();
|
||||
renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().blackVariant );
|
||||
ico = ch == null ? null : ch.getTopTexture_Dark();
|
||||
renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
|
||||
}
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ public class RenderQNB extends BaseBlockRender
|
||||
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||
|
||||
EnumSet<ForgeDirection> sides = tqb.getConnections();
|
||||
renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||
this.renderCableAt( 0.11D, world, x, y, z, block, renderer, transparentGlassCable.getIconIndex( glassCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.141D, sides );
|
||||
this.renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.1875D, sides );
|
||||
}
|
||||
|
||||
float renderMin = 2.0f / 16.0f;
|
||||
@@ -146,7 +146,7 @@ public class RenderQNB extends BaseBlockRender
|
||||
AEColoredItemDefinition coveredCableDefinition = AEApi.instance().parts().partCableCovered;
|
||||
Item transparentCoveredCable = coveredCableDefinition.item( AEColor.Transparent );
|
||||
|
||||
renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
||||
this.renderCableAt( 0.188D, world, x, y, z, block, renderer, transparentCoveredCable.getIconIndex( coveredCableDefinition.stack( AEColor.Transparent, 1 ) ), 0.05D,
|
||||
tqb.getConnections() );
|
||||
|
||||
float renderMin = 4.0f / 16.0f;
|
||||
@@ -166,7 +166,7 @@ public class RenderQNB extends BaseBlockRender
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingCornerLight.getIcon(), renderer, side );
|
||||
this.renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingCornerLight.getIcon(), renderer, side );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public class RenderQNB extends BaseBlockRender
|
||||
Tessellator.instance.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
Tessellator.instance.setBrightness( bn << 20 | bn << 4 );
|
||||
for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingEdgeLight.getIcon(), renderer, side );
|
||||
this.renderFace( x, y, z, block, ExtraBlockTextures.BlockQRingEdgeLight.getIcon(), renderer, side );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class RenderQuartzGlass extends BaseBlockRender
|
||||
|
||||
boolean isFlush(AEBaseBlock imb, IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return isGlass( imb, world, x, y, z );
|
||||
return this.isGlass( imb, world, x, y, z );
|
||||
}
|
||||
|
||||
boolean isGlass(AEBaseBlock imb, IBlockAccess world, int x, int y, int z)
|
||||
@@ -61,9 +61,9 @@ public class RenderQuartzGlass extends BaseBlockRender
|
||||
|
||||
void renderEdge(AEBaseBlock imb, IBlockAccess world, int x, int y, int z, RenderBlocks renderer, ForgeDirection side, ForgeDirection direction)
|
||||
{
|
||||
if ( !isFlush( imb, world, x + side.offsetX, y + side.offsetY, z + side.offsetZ ) )
|
||||
if ( !this.isFlush( imb, world, x + side.offsetX, y + side.offsetY, z + side.offsetZ ) )
|
||||
{
|
||||
if ( !isFlush( imb, world, x + direction.offsetX, y + direction.offsetY, z + direction.offsetZ ) )
|
||||
if ( !this.isFlush( imb, world, x + direction.offsetX, y + direction.offsetY, z + direction.offsetZ ) )
|
||||
{
|
||||
float minX = 0.5f + (side.offsetX + direction.offsetX) / 2.0f;
|
||||
float minY = 0.5f + (side.offsetY + direction.offsetY) / 2.0f;
|
||||
@@ -171,35 +171,35 @@ public class RenderQuartzGlass extends BaseBlockRender
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.EAST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.WEST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.NORTH );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.EAST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.WEST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.NORTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.UP, ForgeDirection.SOUTH );
|
||||
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.EAST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.WEST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.NORTH );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.SOUTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.EAST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.WEST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.NORTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.DOWN, ForgeDirection.SOUTH );
|
||||
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.UP );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.DOWN );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.UP );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.DOWN );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.NORTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.EAST, ForgeDirection.SOUTH );
|
||||
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.UP );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.DOWN );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.UP );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.DOWN );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.NORTH );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.WEST, ForgeDirection.SOUTH );
|
||||
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.EAST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.WEST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.UP );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.DOWN );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.EAST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.WEST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.UP );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.NORTH, ForgeDirection.DOWN );
|
||||
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.EAST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.WEST );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.UP );
|
||||
renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.DOWN );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.EAST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.WEST );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.UP );
|
||||
this.renderEdge( imb, world, x, y, z, renderer, ForgeDirection.SOUTH, ForgeDirection.DOWN );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -62,30 +62,30 @@ public class RenderQuartzTorch extends BaseBlockRender
|
||||
float zOff = 0.0f;
|
||||
|
||||
renderer.setRenderBounds( Point3 + xOff, renderBottom + yOff, Point3 + zOff, Point12 + xOff, renderTop + yOff, Point12 + zOff );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point3 + xOff, renderTop + yOff, Point3 + zOff, Point3 + singlePixel + xOff, renderTop + singlePixel + yOff, Point3 + singlePixel + zOff );
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.setRenderBounds( Point12 - singlePixel + xOff, renderBottom - singlePixel + yOff, Point12 - singlePixel + zOff, Point12 + xOff, renderBottom + yOff, Point12 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 0 ) );
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point3 + zOff, Point3 + xOff, top + yOff, Point12 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
renderer.setRenderBounds( Point12 + xOff, bottom + yOff, Point3 + zOff, Point13 + xOff, top + yOff, Point12 + zOff );
|
||||
|
||||
renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), blk, is, tess, 0xffffff, renderer );
|
||||
|
||||
renderer.renderAllFaces = false;
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
|
||||
@@ -121,12 +121,12 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||
|
||||
BlockRenderInfo bri = imb.getRendererInstance();
|
||||
bri.setTemporaryRenderIcon( null );
|
||||
bri.setTemporaryRenderIcons( getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.UP ),
|
||||
getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.DOWN ),
|
||||
getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.SOUTH ),
|
||||
getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.NORTH ),
|
||||
getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.EAST ),
|
||||
getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.WEST ) );
|
||||
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.UP ),
|
||||
this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.DOWN ),
|
||||
this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.SOUTH ),
|
||||
this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.NORTH ),
|
||||
this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.EAST ),
|
||||
this.getBlockTextureFromSideOutside( imb, sp, displayBits, ori, ForgeDirection.WEST ) );
|
||||
|
||||
boolean r = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
@@ -137,17 +137,17 @@ public class RenderSpatialPylon extends BaseBlockRender
|
||||
Tessellator.instance.setColorOpaque_I( 0xffffff );
|
||||
|
||||
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
|
||||
renderFace( x, y, z, imb, getBlockTextureFromSideInside( imb, sp, displayBits, ori, d ), renderer, d );
|
||||
this.renderFace( x, y, z, imb, this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, d ), renderer, d );
|
||||
}
|
||||
else
|
||||
{
|
||||
bri.setTemporaryRenderIcon( null );
|
||||
bri.setTemporaryRenderIcons( getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.UP ),
|
||||
getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.DOWN ),
|
||||
getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.SOUTH ),
|
||||
getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.NORTH ),
|
||||
getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.EAST ),
|
||||
getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.WEST ) );
|
||||
bri.setTemporaryRenderIcons( this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.UP ),
|
||||
this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.DOWN ),
|
||||
this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.SOUTH ),
|
||||
this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.NORTH ),
|
||||
this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.EAST ),
|
||||
this.getBlockTextureFromSideInside( imb, sp, displayBits, ori, ForgeDirection.WEST ) );
|
||||
|
||||
renderer.renderStandardBlock( imb, x, y, z );
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class RendererSecurity extends BaseBlockRender
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.SOUTH ), block, is, Tessellator.instance, 0x000000, renderer );
|
||||
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.UP ), block, is, Tessellator.instance, adjustBrightness( AEColor.Transparent.whiteVariant, 0.7 ),
|
||||
this.renderInvBlock( EnumSet.of( ForgeDirection.UP ), block, is, Tessellator.instance, this.adjustBrightness( AEColor.Transparent.whiteVariant, 0.7 ),
|
||||
renderer );
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
@@ -62,7 +62,7 @@ public class RendererSecurity extends BaseBlockRender
|
||||
|
||||
ForgeDirection up = sp.getUp();
|
||||
|
||||
preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
this.preRenderInWorld( imb, world, x, y, z, renderer );
|
||||
|
||||
boolean result = renderer.renderStandardBlock( imb, x, y, z );
|
||||
|
||||
@@ -78,20 +78,20 @@ public class RendererSecurity extends BaseBlockRender
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().whiteVariant );
|
||||
IIcon ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Light.getIcon() : ExtraBlockTextures.MEChest.getIcon();
|
||||
renderFace( x, y, z, imb, ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico, renderer, up );
|
||||
if ( sp.isActive() )
|
||||
{
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().mediumVariant );
|
||||
ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Medium.getIcon() : ExtraBlockTextures.MEChest.getIcon();
|
||||
renderFace( x, y, z, imb, ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico, renderer, up );
|
||||
|
||||
Tessellator.instance.setColorOpaque_I( sp.getColor().blackVariant );
|
||||
ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Dark.getIcon() : ExtraBlockTextures.MEChest.getIcon();
|
||||
renderFace( x, y, z, imb, ico, renderer, up );
|
||||
this.renderFace( x, y, z, imb, ico, renderer, up );
|
||||
}
|
||||
|
||||
renderer.overrideBlockTexture = null;
|
||||
postRenderInWorld( renderer );
|
||||
this.postRenderInWorld( renderer );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@ public class AssemblerFX extends EntityFX
|
||||
|
||||
public AssemblerFX(World w, double x, double y, double z, double r, double g, double b, float speed, IAEItemStack is) {
|
||||
super( w, x, y, z, r, g, b );
|
||||
motionX = 0;
|
||||
motionY = 0;
|
||||
motionZ = 0;
|
||||
item = is;
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.item = is;
|
||||
this.speed = speed;
|
||||
fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( fi );
|
||||
particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
this.fi = new EntityFloatingItem( this, w, x, y, z, is.getItemStack() );
|
||||
w.spawnEntityInWorld( this.fi );
|
||||
this.particleMaxAge = (int) Math.ceil( Math.max( 1, 100.0f / speed ) ) + 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -58,25 +58,25 @@ public class AssemblerFX extends EntityFX
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if ( isDead )
|
||||
fi.setDead();
|
||||
if ( this.isDead )
|
||||
this.fi.setDead();
|
||||
else
|
||||
{
|
||||
float lifeSpan = (float) this.particleAge / (float) this.particleMaxAge;
|
||||
fi.setProgress( lifeSpan );
|
||||
this.fi.setProgress( lifeSpan );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(Tessellator tess, float l, float rX, float rY, float rZ, float rYZ, float rXY)
|
||||
{
|
||||
time += l;
|
||||
if ( time > 4.0 )
|
||||
this.time += l;
|
||||
if ( this.time > 4.0 )
|
||||
{
|
||||
time -= 4.0;
|
||||
this.time -= 4.0;
|
||||
// if ( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
for (int x = 0; x < (int) Math.ceil( speed / 5 ); x++)
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Crafting, worldObj, posX, posY, posZ, null );
|
||||
for (int x = 0; x < (int) Math.ceil( this.speed / 5 ); x++)
|
||||
CommonHelper.proxy.spawnEffect( EffectType.Crafting, this.worldObj, this.posX, this.posY, this.posZ, null );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,18 +47,18 @@ public class CraftingFx extends EntityBreakingFX
|
||||
|
||||
public CraftingFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 1;
|
||||
this.particleGreen = 0.9f;
|
||||
this.particleRed = 1;
|
||||
this.particleAlpha = 1.3f;
|
||||
this.particleScale = 1.5f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockEnergyParticle.getIcon();
|
||||
particleMaxAge /= 1.2;
|
||||
this.particleMaxAge /= 1.2;
|
||||
|
||||
startBlkX = MathHelper.floor_double( posX );
|
||||
startBlkY = MathHelper.floor_double( posY );
|
||||
startBlkZ = MathHelper.floor_double( posZ );
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
@@ -97,7 +97,7 @@ public class CraftingFx extends EntityBreakingFX
|
||||
int blkX = MathHelper.floor_double( offX );
|
||||
int blkY = MathHelper.floor_double( offY );
|
||||
int blkZ = MathHelper.floor_double( offZ );
|
||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
if ( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
offX -= interpPosX;
|
||||
offY -= interpPosY;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class EnergyFx extends EntityBreakingFX
|
||||
|
||||
public EnergyFx(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
this.particleGreen = 255;
|
||||
this.particleRed = 255;
|
||||
@@ -55,9 +55,9 @@ public class EnergyFx extends EntityBreakingFX
|
||||
this.particleScale = 3.5f;
|
||||
this.particleTextureIndex = ExtraBlockTextures.BlockEnergyParticle.getIcon();
|
||||
|
||||
startBlkX = MathHelper.floor_double( posX );
|
||||
startBlkY = MathHelper.floor_double( posY );
|
||||
startBlkZ = MathHelper.floor_double( posZ );
|
||||
this.startBlkX = MathHelper.floor_double( this.posX );
|
||||
this.startBlkY = MathHelper.floor_double( this.posY );
|
||||
this.startBlkZ = MathHelper.floor_double( this.posZ );
|
||||
}
|
||||
|
||||
public void fromItem(ForgeDirection d)
|
||||
@@ -90,11 +90,11 @@ public class EnergyFx extends EntityBreakingFX
|
||||
float f13 = (float) (this.prevPosZ + (this.posZ - this.prevPosZ) * par2 - interpPosZ);
|
||||
float f14 = 1.0F;
|
||||
|
||||
int blkX = MathHelper.floor_double( posX );
|
||||
int blkY = MathHelper.floor_double( posY );
|
||||
int blkZ = MathHelper.floor_double( posZ );
|
||||
int blkX = MathHelper.floor_double( this.posX );
|
||||
int blkY = MathHelper.floor_double( this.posY );
|
||||
int blkZ = MathHelper.floor_double( this.posZ );
|
||||
|
||||
if ( blkX == startBlkX && blkY == startBlkY && blkZ == startBlkZ )
|
||||
if ( blkX == this.startBlkX && blkY == this.startBlkY && blkZ == this.startBlkZ )
|
||||
{
|
||||
par1Tessellator.setColorRGBA_F( this.particleRed * f14, this.particleGreen * f14, this.particleBlue * f14, this.particleAlpha );
|
||||
par1Tessellator.addVertexWithUV( f11 - par3 * f10 - par6 * f10, f12 - par4 * f10, f13 - par5 * f10 - par7 * f10,
|
||||
|
||||
@@ -34,23 +34,23 @@ public class LightningArcFX extends LightningFX
|
||||
this.ry = ey - y;
|
||||
this.rz = ez - z;
|
||||
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void regen()
|
||||
{
|
||||
double i = 1.0 / (steps - 1);
|
||||
double lastDirectionX = rx * i;
|
||||
double lastDirectionY = ry * i;
|
||||
double lastDirectionZ = rz * i;
|
||||
double i = 1.0 / (this.steps - 1);
|
||||
double lastDirectionX = this.rx * i;
|
||||
double lastDirectionY = this.ry * i;
|
||||
double lastDirectionZ = this.rz * i;
|
||||
|
||||
double len = Math.sqrt( lastDirectionX * lastDirectionX + lastDirectionY * lastDirectionY + lastDirectionZ * lastDirectionZ );
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
Steps[s][0] = (lastDirectionX + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
Steps[s][1] = (lastDirectionY + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
Steps[s][2] = (lastDirectionZ + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][0] = (lastDirectionX + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][1] = (lastDirectionY + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
this.Steps[s][2] = (lastDirectionZ + (rng.nextDouble() - 0.5) * len * 1.2) / 2.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,17 +30,17 @@ import net.minecraft.world.World;
|
||||
public class LightningFX extends EntityFX
|
||||
{
|
||||
|
||||
final int steps = getSteps();
|
||||
final int steps = this.getSteps();
|
||||
static final Random rng = new Random();
|
||||
final double[][] Steps;
|
||||
|
||||
protected LightningFX(World w, double x, double y, double z, double r, double g, double b, int maxAge) {
|
||||
super( w, x, y, z, r, g, b );
|
||||
Steps = new double[steps][3];
|
||||
motionX = 0;
|
||||
motionY = 0;
|
||||
motionZ = 0;
|
||||
particleMaxAge = maxAge;
|
||||
this.Steps = new double[this.steps][3];
|
||||
this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;
|
||||
this.particleMaxAge = maxAge;
|
||||
}
|
||||
|
||||
private int getSteps()
|
||||
@@ -50,7 +50,7 @@ public class LightningFX extends EntityFX
|
||||
|
||||
public LightningFX(World w, double x, double y, double z, double r, double g, double b) {
|
||||
this( w, x, y, z, r, g, b, 6 );
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
|
||||
float currentPoint = 0;
|
||||
@@ -67,11 +67,11 @@ public class LightningFX extends EntityFX
|
||||
double lastDirectionX = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionY = (rng.nextDouble() - 0.5) * 0.9;
|
||||
double lastDirectionZ = (rng.nextDouble() - 0.5) * 0.9;
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
Steps[s][0] = lastDirectionX = (lastDirectionX + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
Steps[s][1] = lastDirectionY = (lastDirectionY + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
Steps[s][2] = lastDirectionZ = (lastDirectionZ + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][0] = lastDirectionX = (lastDirectionX + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][1] = lastDirectionY = (lastDirectionY + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
this.Steps[s][2] = lastDirectionZ = (lastDirectionZ + (rng.nextDouble() - 0.5) * 0.9) / 2.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ public class LightningFX extends EntityFX
|
||||
{
|
||||
float j = 1.0f;
|
||||
tess.setColorRGBA_F( this.particleRed * j * 0.9f, this.particleGreen * j * 0.95f, this.particleBlue * j, this.particleAlpha );
|
||||
if ( particleAge == 3 )
|
||||
if ( this.particleAge == 3 )
|
||||
{
|
||||
regen();
|
||||
this.regen();
|
||||
}
|
||||
double f6 = this.particleTextureIndexX / 16.0;
|
||||
double f7 = f6 + 0.0324375F;
|
||||
@@ -127,17 +127,17 @@ public class LightningFX extends EntityFX
|
||||
|
||||
for (int cycle = 0; cycle < 3; cycle++)
|
||||
{
|
||||
clear();
|
||||
this.clear();
|
||||
|
||||
double x = (this.prevPosX + (this.posX - this.prevPosX) * l - interpPosX) - offX;
|
||||
double y = (this.prevPosY + (this.posY - this.prevPosY) * l - interpPosY) - offY;
|
||||
double z = (this.prevPosZ + (this.posZ - this.prevPosZ) * l - interpPosZ) - offZ;
|
||||
|
||||
for (int s = 0; s < steps; s++)
|
||||
for (int s = 0; s < this.steps; s++)
|
||||
{
|
||||
double xN = x + Steps[s][0];
|
||||
double yN = y + Steps[s][1];
|
||||
double zN = z + Steps[s][2];
|
||||
double xN = x + this.Steps[s][0];
|
||||
double yN = y + this.Steps[s][1];
|
||||
double zN = z + this.Steps[s][2];
|
||||
|
||||
double xD = xN - x;
|
||||
double yD = yN - y;
|
||||
@@ -162,7 +162,7 @@ public class LightningFX extends EntityFX
|
||||
oz = (xD * 0) - (1 * yD);
|
||||
}
|
||||
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) steps - (double) s) / steps) * scale);
|
||||
double ss = Math.sqrt( ox * ox + oy * oy + oz * oz ) / ((((double) this.steps - (double) s) / this.steps) * scale);
|
||||
ox /= ss;
|
||||
oy /= ss;
|
||||
oz /= ss;
|
||||
@@ -175,7 +175,7 @@ public class LightningFX extends EntityFX
|
||||
b[1] = y;
|
||||
b[2] = z;
|
||||
|
||||
draw( tess, a, b, f6, f8 );
|
||||
this.draw( tess, a, b, f6, f8 );
|
||||
|
||||
x = xN;
|
||||
y = yN;
|
||||
@@ -195,23 +195,23 @@ public class LightningFX extends EntityFX
|
||||
|
||||
private void draw(Tessellator tess, double[] a, double[] b, double f6, double f8)
|
||||
{
|
||||
if ( hasData )
|
||||
if ( this.hasData )
|
||||
{
|
||||
tess.addVertexWithUV( a[0], a[1], a[2], f6, f8 );
|
||||
tess.addVertexWithUV( I[0], I[1], I[2], f6, f8 );
|
||||
tess.addVertexWithUV( K[0], K[1], K[2], f6, f8 );
|
||||
tess.addVertexWithUV( this.I[0], this.I[1], this.I[2], f6, f8 );
|
||||
tess.addVertexWithUV( this.K[0], this.K[1], this.K[2], f6, f8 );
|
||||
tess.addVertexWithUV( b[0], b[1], b[2], f6, f8 );
|
||||
}
|
||||
hasData = true;
|
||||
this.hasData = true;
|
||||
for (int x = 0; x < 3; x++)
|
||||
{
|
||||
I[x] = a[x];
|
||||
K[x] = b[x];
|
||||
this.I[x] = a[x];
|
||||
this.K[x] = b[x];
|
||||
}
|
||||
}
|
||||
|
||||
private void clear()
|
||||
{
|
||||
hasData = false;
|
||||
this.hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class MatterCannonFX extends EntityBreakingFX
|
||||
|
||||
public MatterCannonFX(World par1World, double par2, double par4, double par6, Item par8Item) {
|
||||
super( par1World, par2, par4, par6, par8Item );
|
||||
particleGravity = 0;
|
||||
this.particleGravity = 0;
|
||||
this.particleBlue = 255;
|
||||
this.particleGreen = 255;
|
||||
this.particleRed = 255;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
{
|
||||
boolean isShiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT );
|
||||
|
||||
if ( !recursive && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld )
|
||||
if ( !this.recursive && type == IItemRenderer.ItemRenderType.INVENTORY && isShiftHeld )
|
||||
{
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
if ( iep.getOutput( item ) != null )
|
||||
@@ -59,7 +59,7 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
recursive = true;
|
||||
this.recursive = true;
|
||||
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) item.getItem();
|
||||
|
||||
@@ -68,10 +68,10 @@ public class ItemEncodedPatternRenderer implements IItemRenderer
|
||||
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
ri.renderItemAndEffectIntoGUI( mc.fontRenderer, mc.getTextureManager(), is, 0, 0 );
|
||||
this.ri.renderItemAndEffectIntoGUI( mc.fontRenderer, mc.getTextureManager(), is, 0, 0 );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glPopAttrib();
|
||||
|
||||
recursive = false;
|
||||
this.recursive = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,60 +34,60 @@ public class ModelCompass extends ModelBase
|
||||
final ModelRenderer Pointer;
|
||||
|
||||
public ModelCompass() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 8;
|
||||
this.textureWidth = 16;
|
||||
this.textureHeight = 8;
|
||||
|
||||
Ring1 = new ModelRenderer( this, 0, 0 );
|
||||
Ring1.addBox( 0F, 0F, 0F, 4, 1, 1 );
|
||||
Ring1.setRotationPoint( -2F, 22F, 2F );
|
||||
Ring1.setTextureSize( 16, 8 );
|
||||
Ring1.mirror = true;
|
||||
setRotation( Ring1, 0F, 0F, 0F );
|
||||
this.Ring1 = new ModelRenderer( this, 0, 0 );
|
||||
this.Ring1.addBox( 0F, 0F, 0F, 4, 1, 1 );
|
||||
this.Ring1.setRotationPoint( -2F, 22F, 2F );
|
||||
this.Ring1.setTextureSize( 16, 8 );
|
||||
this.Ring1.mirror = true;
|
||||
this.setRotation( this.Ring1, 0F, 0F, 0F );
|
||||
|
||||
Ring2 = new ModelRenderer( this, 0, 0 );
|
||||
Ring2.addBox( 0F, 0F, 0F, 1, 1, 4 );
|
||||
Ring2.setRotationPoint( -3F, 22F, -2F );
|
||||
Ring2.setTextureSize( 16, 8 );
|
||||
Ring2.mirror = true;
|
||||
setRotation( Ring2, 0F, 0F, 0F );
|
||||
this.Ring2 = new ModelRenderer( this, 0, 0 );
|
||||
this.Ring2.addBox( 0F, 0F, 0F, 1, 1, 4 );
|
||||
this.Ring2.setRotationPoint( -3F, 22F, -2F );
|
||||
this.Ring2.setTextureSize( 16, 8 );
|
||||
this.Ring2.mirror = true;
|
||||
this.setRotation( this.Ring2, 0F, 0F, 0F );
|
||||
|
||||
Ring3 = new ModelRenderer( this, 0, 0 );
|
||||
Ring3.addBox( 0F, 0F, 0F, 4, 1, 1 );
|
||||
Ring3.setRotationPoint( -2F, 22F, -3F );
|
||||
Ring3.setTextureSize( 16, 8 );
|
||||
Ring3.mirror = true;
|
||||
setRotation( Ring3, 0F, 0F, 0F );
|
||||
this.Ring3 = new ModelRenderer( this, 0, 0 );
|
||||
this.Ring3.addBox( 0F, 0F, 0F, 4, 1, 1 );
|
||||
this.Ring3.setRotationPoint( -2F, 22F, -3F );
|
||||
this.Ring3.setTextureSize( 16, 8 );
|
||||
this.Ring3.mirror = true;
|
||||
this.setRotation( this.Ring3, 0F, 0F, 0F );
|
||||
|
||||
Ring4 = new ModelRenderer( this, 0, 0 );
|
||||
Ring4.addBox( 0F, 0F, 0F, 1, 1, 4 );
|
||||
Ring4.setRotationPoint( 2F, 22F, -2F );
|
||||
Ring4.setTextureSize( 16, 8 );
|
||||
Ring4.mirror = true;
|
||||
setRotation( Ring4, 0F, 0F, 0F );
|
||||
this.Ring4 = new ModelRenderer( this, 0, 0 );
|
||||
this.Ring4.addBox( 0F, 0F, 0F, 1, 1, 4 );
|
||||
this.Ring4.setRotationPoint( 2F, 22F, -2F );
|
||||
this.Ring4.setTextureSize( 16, 8 );
|
||||
this.Ring4.mirror = true;
|
||||
this.setRotation( this.Ring4, 0F, 0F, 0F );
|
||||
|
||||
Middle = new ModelRenderer( this, 0, 0 );
|
||||
Middle.addBox( 0F, 0F, 0F, 1, 1, 1 );
|
||||
Middle.setRotationPoint( -0.5333334F, 22F, -0.5333334F );
|
||||
Middle.setTextureSize( 16, 8 );
|
||||
Middle.mirror = true;
|
||||
setRotation( Middle, 0F, 0F, 0F );
|
||||
this.Middle = new ModelRenderer( this, 0, 0 );
|
||||
this.Middle.addBox( 0F, 0F, 0F, 1, 1, 1 );
|
||||
this.Middle.setRotationPoint( -0.5333334F, 22F, -0.5333334F );
|
||||
this.Middle.setTextureSize( 16, 8 );
|
||||
this.Middle.mirror = true;
|
||||
this.setRotation( this.Middle, 0F, 0F, 0F );
|
||||
|
||||
Pointer = new ModelRenderer( this, 0, 0 );
|
||||
Pointer.setTextureOffset( 0, 5 );
|
||||
Pointer.addBox( -0.5F, 0F, 0F, 1, 1, 2 );
|
||||
Pointer.setRotationPoint( 0.5F, 22.5F, 0.5F );
|
||||
Pointer.setTextureSize( 16, 8 );
|
||||
Pointer.mirror = true;
|
||||
Pointer.offsetZ = -0.034f;
|
||||
Pointer.offsetX = -0.034f;
|
||||
setRotation( Pointer, 0F, 0F, 0F );
|
||||
this.Pointer = new ModelRenderer( this, 0, 0 );
|
||||
this.Pointer.setTextureOffset( 0, 5 );
|
||||
this.Pointer.addBox( -0.5F, 0F, 0F, 1, 1, 2 );
|
||||
this.Pointer.setRotationPoint( 0.5F, 22.5F, 0.5F );
|
||||
this.Pointer.setTextureSize( 16, 8 );
|
||||
this.Pointer.mirror = true;
|
||||
this.Pointer.offsetZ = -0.034f;
|
||||
this.Pointer.offsetX = -0.034f;
|
||||
this.setRotation( this.Pointer, 0F, 0F, 0F );
|
||||
|
||||
Base = new ModelRenderer( this, 0, 0 );
|
||||
Base.addBox( 0F, 0F, 0F, 4, 1, 4 );
|
||||
Base.setRotationPoint( -2F, 23F, -2F );
|
||||
Base.setTextureSize( 16, 8 );
|
||||
Base.mirror = true;
|
||||
setRotation( Base, 0F, 0F, 0F );
|
||||
this.Base = new ModelRenderer( this, 0, 0 );
|
||||
this.Base.addBox( 0F, 0F, 0F, 4, 1, 4 );
|
||||
this.Base.setRotationPoint( -2F, 23F, -2F );
|
||||
this.Base.setTextureSize( 16, 8 );
|
||||
this.Base.mirror = true;
|
||||
this.setRotation( this.Base, 0F, 0F, 0F );
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
@@ -99,18 +99,18 @@ public class ModelCompass extends ModelBase
|
||||
|
||||
public void renderAll(float rad)
|
||||
{
|
||||
setRotation( Pointer, 0F, 0F, 0F );
|
||||
this.setRotation( this.Pointer, 0F, 0F, 0F );
|
||||
|
||||
Pointer.rotateAngleY = rad;
|
||||
this.Pointer.rotateAngleY = rad;
|
||||
|
||||
Base.render( 0.0625F );
|
||||
Middle.render( 0.0625F );
|
||||
this.Base.render( 0.0625F );
|
||||
this.Middle.render( 0.0625F );
|
||||
|
||||
Pointer.render( 0.0625F );
|
||||
this.Pointer.render( 0.0625F );
|
||||
|
||||
Ring1.render( 0.0625F );
|
||||
Ring2.render( 0.0625F );
|
||||
Ring3.render( 0.0625F );
|
||||
Ring4.render( 0.0625F );
|
||||
this.Ring1.render( 0.0625F );
|
||||
this.Ring2.render( 0.0625F );
|
||||
this.Ring3.render( 0.0625F );
|
||||
this.Ring4.render( 0.0625F );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public enum CableBusTextures
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
private CableBusTextures(String name) {
|
||||
@@ -106,12 +106,12 @@ public enum CableBusTextures
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -107,7 +107,7 @@ public enum ExtraBlockTextures
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
private ExtraBlockTextures(String name) {
|
||||
@@ -116,12 +116,12 @@ public enum ExtraBlockTextures
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -45,7 +45,7 @@ public enum ExtraItemTextures
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
|
||||
private ExtraItemTextures(String name) {
|
||||
@@ -54,12 +54,12 @@ public enum ExtraItemTextures
|
||||
|
||||
public IIcon getIcon()
|
||||
{
|
||||
return IIcon;
|
||||
return this.IIcon;
|
||||
}
|
||||
|
||||
public void registerIcon(TextureMap map)
|
||||
{
|
||||
IIcon = map.registerIcon( "appliedenergistics2:" + name );
|
||||
this.IIcon = map.registerIcon( "appliedenergistics2:" + this.name );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -32,92 +32,92 @@ public class FlippableIcon implements IIcon
|
||||
if ( o == null )
|
||||
throw new RuntimeException( "Cannot create a wrapper icon with a null icon." );
|
||||
|
||||
original = o;
|
||||
flip_u = false;
|
||||
flip_v = false;
|
||||
this.original = o;
|
||||
this.flip_u = false;
|
||||
this.flip_v = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return original.getIconWidth();
|
||||
return this.original.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return original.getIconHeight();
|
||||
return this.original.getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinU()
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getMaxU();
|
||||
return original.getMinU();
|
||||
if ( this.flip_u )
|
||||
return this.original.getMaxU();
|
||||
return this.original.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxU()
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getMinU();
|
||||
return original.getMaxU();
|
||||
if ( this.flip_u )
|
||||
return this.original.getMinU();
|
||||
return this.original.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double px)
|
||||
{
|
||||
if ( flip_u )
|
||||
return original.getInterpolatedU( 16 - px );
|
||||
return original.getInterpolatedU( px );
|
||||
if ( this.flip_u )
|
||||
return this.original.getInterpolatedU( 16 - px );
|
||||
return this.original.getInterpolatedU( px );
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinV()
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getMaxV();
|
||||
return original.getMinV();
|
||||
if ( this.flip_v )
|
||||
return this.original.getMaxV();
|
||||
return this.original.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxV()
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getMinV();
|
||||
return original.getMaxV();
|
||||
if ( this.flip_v )
|
||||
return this.original.getMinV();
|
||||
return this.original.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double px)
|
||||
{
|
||||
if ( flip_v )
|
||||
return original.getInterpolatedV( 16 - px );
|
||||
return original.getInterpolatedV( px );
|
||||
if ( this.flip_v )
|
||||
return this.original.getInterpolatedV( 16 - px );
|
||||
return this.original.getInterpolatedV( px );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconName()
|
||||
{
|
||||
return original.getIconName();
|
||||
return this.original.getIconName();
|
||||
}
|
||||
|
||||
public IIcon getOriginal()
|
||||
{
|
||||
return original;
|
||||
return this.original;
|
||||
}
|
||||
|
||||
public void setFlip(boolean u, boolean v)
|
||||
{
|
||||
flip_u = u;
|
||||
flip_v = v;
|
||||
this.flip_u = u;
|
||||
this.flip_v = v;
|
||||
}
|
||||
|
||||
public int setFlip(int orientation)
|
||||
{
|
||||
flip_u = (orientation & 8) == 8;
|
||||
flip_v = (orientation & 16) == 16;
|
||||
this.flip_u = (orientation & 8) == 8;
|
||||
this.flip_v = (orientation & 16) == 16;
|
||||
return orientation & 7;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,21 +32,21 @@ public class FullIcon implements IIcon
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
this.p = o;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return p.getMinU();
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return p.getMaxU();
|
||||
return this.p.getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -54,22 +54,22 @@ public class FullIcon implements IIcon
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return p.getMaxU();
|
||||
return p.getMinU();
|
||||
return this.p.getMaxU();
|
||||
return this.p.getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return p.getMinV();
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return p.getMaxV();
|
||||
return this.p.getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -77,27 +77,27 @@ public class FullIcon implements IIcon
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
if ( d0 > 8.0 )
|
||||
return p.getMaxV();
|
||||
return p.getMinV();
|
||||
return this.p.getMaxV();
|
||||
return this.p.getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
return this.p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,68 +31,68 @@ public class MissingIcon implements IIcon
|
||||
final boolean isBlock;
|
||||
|
||||
public MissingIcon(Object forWhat) {
|
||||
isBlock = forWhat instanceof Block;
|
||||
this.isBlock = forWhat instanceof Block;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getMissing()
|
||||
{
|
||||
return ((TextureMap) Minecraft.getMinecraft().getTextureManager()
|
||||
.getTexture( isBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
||||
.getTexture( this.isBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture )).getAtlasSprite( "missingno" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return getMissing().getIconWidth();
|
||||
return this.getMissing().getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return getMissing().getIconHeight();
|
||||
return this.getMissing().getIconHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinU()
|
||||
{
|
||||
return getMissing().getMinU();
|
||||
return this.getMissing().getMinU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxU()
|
||||
{
|
||||
return getMissing().getMaxU();
|
||||
return this.getMissing().getMaxU();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedU(double var1)
|
||||
{
|
||||
return getMissing().getInterpolatedU( var1 );
|
||||
return this.getMissing().getInterpolatedU( var1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMinV()
|
||||
{
|
||||
return getMissing().getMinV();
|
||||
return this.getMissing().getMinV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMaxV()
|
||||
{
|
||||
return getMissing().getMaxV();
|
||||
return this.getMissing().getMaxV();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolatedV(double var1)
|
||||
{
|
||||
return getMissing().getInterpolatedV( var1 );
|
||||
return this.getMissing().getInterpolatedV( var1 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIconName()
|
||||
{
|
||||
return getMissing().getIconName();
|
||||
return this.getMissing().getIconName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,80 +35,80 @@ public class OffsetIcon implements IIcon
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
offsetX = x;
|
||||
offsetY = y;
|
||||
this.p = o;
|
||||
this.offsetX = x;
|
||||
this.offsetY = y;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return u( 0 - offsetX );
|
||||
return this.u( 0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return u( 16 - offsetX );
|
||||
return this.u( 16 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return u( d0 - offsetX );
|
||||
return this.u( d0 - this.offsetX );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return v( 0 - offsetY );
|
||||
return this.v( 0 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return v( 16 - offsetY );
|
||||
return this.v( 16 - this.offsetY );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return v( d0 - offsetY );
|
||||
return this.v( d0 - this.offsetY );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
return p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
return p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
return this.p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class TaughtIcon implements IIcon
|
||||
if ( o == null )
|
||||
throw new RuntimeException("Cannot create a wrapper icon with a null icon.");
|
||||
|
||||
p = o;
|
||||
this.p = o;
|
||||
this.tightness = tightness * 0.4f;
|
||||
}
|
||||
|
||||
@@ -42,79 +42,79 @@ public class TaughtIcon implements IIcon
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinU()
|
||||
{
|
||||
return u( 0 );
|
||||
return this.u( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxU()
|
||||
{
|
||||
return u( 16 );
|
||||
return this.u( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedU(double d0)
|
||||
{
|
||||
return u( d0 );
|
||||
return this.u( d0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMinV()
|
||||
{
|
||||
return v( 0 );
|
||||
return this.v( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getMaxV()
|
||||
{
|
||||
return v( 16 );
|
||||
return this.v( 16 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getInterpolatedV(double d0)
|
||||
{
|
||||
return v( d0 );
|
||||
return this.v( d0 );
|
||||
}
|
||||
|
||||
private float v(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= tightness;
|
||||
d -= this.tightness;
|
||||
if ( d > 8 )
|
||||
d += tightness;
|
||||
return p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedV( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
private float u(double d)
|
||||
{
|
||||
if ( d < 8 )
|
||||
d -= tightness;
|
||||
d -= this.tightness;
|
||||
if ( d > 8 )
|
||||
d += tightness;
|
||||
return p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
d += this.tightness;
|
||||
return this.p.getInterpolatedU( Math.min( 16.0, Math.max( 0.0, d ) ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getIconName()
|
||||
{
|
||||
return p.getIconName();
|
||||
return this.p.getIconName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconWidth()
|
||||
{
|
||||
return p.getIconWidth();
|
||||
return this.p.getIconWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight()
|
||||
{
|
||||
return p.getIconHeight();
|
||||
return this.p.getIconHeight();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TmpFlippableIcon extends FlippableIcon
|
||||
|
||||
public void setOriginal(IIcon i)
|
||||
{
|
||||
setFlip( false, false );
|
||||
this.setFlip( false, false );
|
||||
|
||||
while (i instanceof FlippableIcon)
|
||||
{
|
||||
@@ -47,9 +47,9 @@ public class TmpFlippableIcon extends FlippableIcon
|
||||
}
|
||||
|
||||
if ( i == null )
|
||||
original = nullIcon;
|
||||
this.original = nullIcon;
|
||||
else
|
||||
original = i;
|
||||
this.original = i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user