Ported to 1.7
This commit is contained in:
+34
-28
@@ -39,9 +39,10 @@ import appeng.container.slot.SlotInaccessable;
|
||||
import appeng.container.slot.SlotOutput;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketInventoryAction;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
@@ -115,7 +116,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
try
|
||||
{
|
||||
p = new PacketInventoryAction( action, slotIdx, stack );
|
||||
PacketDispatcher.sendPacketToServer( p.getPacket() );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -144,7 +145,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
try
|
||||
{
|
||||
p = new PacketInventoryAction( action, slotIdx, stack );
|
||||
PacketDispatcher.sendPacketToServer( p.getPacket() );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -194,7 +195,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
try
|
||||
{
|
||||
p = new PacketInventoryAction( action, inventorySlots.inventorySlots.size(), stack );
|
||||
PacketDispatcher.sendPacketToServer( p.getPacket() );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -255,7 +256,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
for (var6 = 0; var6 < var4.length; ++var6)
|
||||
{
|
||||
var7 = fontRenderer.getStringWidth( (String) var4[var6] );
|
||||
var7 = fontRendererObj.getStringWidth( (String) var4[var6] );
|
||||
|
||||
if ( var7 > var5 )
|
||||
{
|
||||
@@ -281,7 +282,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
var5 = forceWidth;
|
||||
|
||||
this.zLevel = 300.0F;
|
||||
itemRenderer.zLevel = 300.0F;
|
||||
itemRender.zLevel = 300.0F;
|
||||
int var10 = -267386864;
|
||||
this.drawGradientRect( var6 - 3, var7 - 4, var6 + var5 + 3, var7 - 3, var10, var10 );
|
||||
this.drawGradientRect( var6 - 3, var7 + var9 + 3, var6 + var5 + 3, var7 + var9 + 4, var10, var10 );
|
||||
@@ -308,7 +309,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
var14 = "\u00a77" + var14;
|
||||
}
|
||||
|
||||
this.fontRenderer.drawStringWithShadow( var14, var6, var7, -1 );
|
||||
this.fontRendererObj.drawStringWithShadow( var14, var6, var7, -1 );
|
||||
|
||||
if ( var13 == 0 )
|
||||
{
|
||||
@@ -319,7 +320,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
@@ -343,15 +344,15 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
protected void drawItem(int x, int y, ItemStack is)
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
itemRenderer.zLevel = 100.0F;
|
||||
itemRender.zLevel = 100.0F;
|
||||
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
itemRenderer.renderItemAndEffectIntoGUI( this.fontRenderer, this.mc.renderEngine, is, x, y );
|
||||
itemRender.renderItemAndEffectIntoGUI( this.fontRendererObj, this.mc.renderEngine, is, x, y );
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
this.zLevel = 0.0F;
|
||||
}
|
||||
|
||||
@@ -401,7 +402,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
for (int j1 = 0; j1 < this.inventorySlots.inventorySlots.size(); ++j1)
|
||||
{
|
||||
Slot slot = (Slot) this.inventorySlots.inventorySlots.get( j1 );
|
||||
if ( isPointInRegion( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) )
|
||||
|
||||
// isPointInRegion
|
||||
if ( func_146978_c( slot.xDisplayPosition, slot.yDisplayPosition, 16, 16, mousex, mousey ) )
|
||||
{
|
||||
return slot;
|
||||
}
|
||||
@@ -430,12 +433,13 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
try
|
||||
{
|
||||
super.drawSlotInventory( s );
|
||||
// drawSlotInventory
|
||||
// super.func_146977_a( s );
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
if ( tessellator.isDrawing )
|
||||
if ( Platform.isDrawing( tessellator ) )
|
||||
tessellator.draw();
|
||||
}
|
||||
}
|
||||
@@ -447,17 +451,18 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Override
|
||||
// private void func_146977_a(Slot p_146977_1_)
|
||||
protected void drawSlotInventory(Slot s)
|
||||
{
|
||||
if ( s instanceof SlotME )
|
||||
{
|
||||
RenderItem pIR = itemRenderer;
|
||||
itemRenderer = aeri;
|
||||
RenderItem pIR = itemRender;
|
||||
itemRender = aeri;
|
||||
try
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
itemRenderer.zLevel = 100.0F;
|
||||
itemRender.zLevel = 100.0F;
|
||||
|
||||
if ( !isPowered() )
|
||||
{
|
||||
@@ -467,7 +472,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
|
||||
if ( s instanceof SlotME )
|
||||
aeri.aestack = ((SlotME) s).getAEStack();
|
||||
@@ -479,10 +484,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
catch (Exception err)
|
||||
{
|
||||
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
|
||||
if ( Tessellator.instance.isDrawing )
|
||||
if ( Platform.isDrawing( Tessellator.instance ) )
|
||||
Tessellator.instance.draw();
|
||||
}
|
||||
itemRenderer = pIR;
|
||||
itemRender = pIR;
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -522,10 +527,10 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, aes.getOpacityOfIcon() );
|
||||
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + par6), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
|
||||
(double) ((float) (par4 + par6) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + par6), (double) this.zLevel, (double) ((float) (par3 + par5) * f),
|
||||
(double) ((float) (par4 + par6) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + 0), (double) this.zLevel, (double) ((float) (par3 + par5) * f),
|
||||
(double) ((float) (par4 + 0) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + par6), (double) this.zLevel,
|
||||
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + par6) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + par5), (double) (par2 + 0), (double) this.zLevel,
|
||||
(double) ((float) (par3 + par5) * f), (double) ((float) (par4 + 0) * f1) );
|
||||
tessellator.addVertexWithUV( (double) (par1 + 0), (double) (par2 + 0), (double) this.zLevel, (double) ((float) (par3 + 0) * f),
|
||||
(double) ((float) (par4 + 0) * f1) );
|
||||
tessellator.setColorRGBA_F( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
@@ -533,7 +538,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
if ( tessellator.isDrawing )
|
||||
if ( Platform.isDrawing( tessellator ) )
|
||||
tessellator.draw();
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
@@ -563,14 +568,14 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if ( ((AppEngSlot) s).isValid == hasCalculatedValidness.Invalid )
|
||||
{
|
||||
this.zLevel = 100.0F;
|
||||
itemRenderer.zLevel = 100.0F;
|
||||
itemRender.zLevel = 100.0F;
|
||||
|
||||
GL11.glDisable( GL11.GL_LIGHTING );
|
||||
super.drawRect( s.xDisplayPosition, s.yDisplayPosition, 16 + s.xDisplayPosition, 16 + s.yDisplayPosition, 0x66ff6666 );
|
||||
GL11.glEnable( GL11.GL_LIGHTING );
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
itemRenderer.zLevel = 0.0F;
|
||||
itemRender.zLevel = 0.0F;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,4 +597,5 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
// do the usual for non-ME Slots.
|
||||
safeDrawSlot( s );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
}
|
||||
|
||||
// Vanillia version...
|
||||
@Override
|
||||
protected void drawItemStackTooltip(ItemStack stack, int x, int y)
|
||||
{
|
||||
Slot s = getSlot( x, y );
|
||||
@@ -96,7 +95,7 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
return;
|
||||
}
|
||||
}
|
||||
super.drawItemStackTooltip( stack, x, y );
|
||||
// super.drawItemStackTooltip( stack, x, y );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,10 +17,10 @@ import appeng.api.implementations.items.IUpgradeModule;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerCellWorkbench;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.tile.misc.TileCellWorkbench;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
@@ -104,11 +104,11 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
{
|
||||
if ( btn == partition )
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "CellWorkbench.Action", "Partition" )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Action", "Partition" ) );
|
||||
}
|
||||
else if ( btn == clear )
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "CellWorkbench.Action", "Clear" )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Action", "Clear" ) );
|
||||
}
|
||||
else if ( btn == fuzzyMode )
|
||||
{
|
||||
@@ -117,7 +117,7 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
FuzzyMode fz = (FuzzyMode) fuzzyMode.getCurrentValue();
|
||||
fz = Platform.rotateEnum( fz, backwards, Settings.FUZZY_MODE.getPossibleValues() );
|
||||
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() ) );
|
||||
}
|
||||
else
|
||||
super.actionPerformed( btn );
|
||||
|
||||
@@ -10,9 +10,9 @@ import appeng.container.implementations.ContainerChest;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.tile.storage.TileChest;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiChest extends AEBaseGui
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class GuiChest extends AEBaseGui
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketSwitchGuis( GuiBridge.GUI_PRIORITY )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class GuiChest extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRenderer ) );
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
}
|
||||
|
||||
public GuiChest(InventoryPlayer inventoryPlayer, TileChest te) {
|
||||
@@ -60,8 +60,8 @@ public class GuiChest extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Chest.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Chest.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,9 +15,9 @@ import appeng.client.gui.widgets.GuiProgressBar.Direction;
|
||||
import appeng.container.implementations.ContainerCondenser;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiCondenser extends AEBaseGui
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public class GuiCondenser extends AEBaseGui
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.CONDENSER_OUTPUT, backwards ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -77,8 +77,8 @@ public class GuiCondenser extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Condenser.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Condenser.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
||||
mode.set( cvc.output );
|
||||
mode.FillVar = "" + cvc.output.requiredPower;
|
||||
|
||||
@@ -22,7 +22,7 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
fontRenderer.drawString( GuiText.CraftingTerminal.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.CraftingTerminal.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ import appeng.container.implementations.ContainerDrive;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiDrive extends AEBaseGui
|
||||
{
|
||||
@@ -28,7 +28,7 @@ public class GuiDrive extends AEBaseGui
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketSwitchGuis( GuiBridge.GUI_PRIORITY )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ public class GuiDrive extends AEBaseGui
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRenderer ) );
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
}
|
||||
|
||||
public GuiDrive(InventoryPlayer inventoryPlayer, TileDrive te) {
|
||||
@@ -60,8 +60,8 @@ public class GuiDrive extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Drive.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Drive.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ public class GuiGrinder extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.GrindStone.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.GrindStone.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerIOPort;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.tile.storage.TileIOPort;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiIOPort extends GuiUpgradeable
|
||||
{
|
||||
@@ -42,8 +42,8 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.IOPort.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.IOPort.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( redstoneMode != null )
|
||||
redstoneMode.set( cvb.rsMode );
|
||||
@@ -77,10 +77,10 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
try
|
||||
{
|
||||
if ( btn == fullMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( fullMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fullMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == operationMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( operationMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( operationMode.getSetting(), backwards ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -24,13 +24,13 @@ public class GuiInterface extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Interface.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Interface.getLocal(), 8, 6, 4210752 );
|
||||
|
||||
fontRenderer.drawString( GuiText.Config.getLocal(), 18, 6 + 11 + 7, 4210752 );
|
||||
fontRenderer.drawString( GuiText.StoredItems.getLocal(), 18, 6 + 60 + 7, 4210752 );
|
||||
fontRenderer.drawString( GuiText.Patterns.getLocal(), 8, 6 + 73 + 7, 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 );
|
||||
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerLevelEmitter;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.parts.automation.PartLevelEmitter;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiLevelEmitter extends GuiUpgradeable
|
||||
{
|
||||
@@ -34,7 +34,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
{
|
||||
super.initGui();
|
||||
|
||||
level = new GuiTextField( this.fontRenderer, this.guiLeft + 44, this.guiTop + 43, 59, this.fontRenderer.FONT_HEIGHT );
|
||||
level = new GuiTextField( fontRendererObj, this.guiLeft + 44, this.guiTop + 43, 59, fontRendererObj.FONT_HEIGHT );
|
||||
level.setEnableBackgroundDrawing( false );
|
||||
level.setMaxStringLength( 16 );
|
||||
level.setTextColor( 0xFFFFFF );
|
||||
@@ -112,7 +112,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
|
||||
level.setText( Out = Long.toString( result ) );
|
||||
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "LevelEmitter.Value", Out )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "LevelEmitter.Value", Out )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -124,7 +124,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource
|
||||
buttonList.add( new GuiImgButton( this.guiLeft - 18, offset, Settings.SORT_DIRECTION, Configuration.instance.settings
|
||||
.getSetting( Settings.SORT_DIRECTION ) ) );
|
||||
|
||||
searchField = new GuiTextField( this.fontRenderer, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, this.fontRenderer.FONT_HEIGHT );
|
||||
searchField = new GuiTextField( fontRendererObj, this.guiLeft + Math.max( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT );
|
||||
searchField.setEnableBackgroundDrawing( false );
|
||||
searchField.setMaxStringLength( 25 );
|
||||
searchField.setTextColor( 0xFFFFFF );
|
||||
@@ -201,8 +201,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( myName.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( myName.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -108,10 +108,10 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
{
|
||||
ContainerNetworkStatus ns = (ContainerNetworkStatus) inventorySlots;
|
||||
|
||||
fontRenderer.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.NetworkDetails.getLocal(), 8, 6, 4210752 );
|
||||
|
||||
fontRenderer.drawString( GuiText.PowerInputRate.getLocal() + ": " + formatPowerLong( ns.avgAddition ), 8, 16, 4210752 );
|
||||
fontRenderer.drawString( GuiText.PowerUsageRate.getLocal() + ": " + formatPowerLong( ns.powerUsage ), 8, 26, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.PowerInputRate.getLocal() + ": " + formatPowerLong( ns.avgAddition ), 8, 16, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.PowerUsageRate.getLocal() + ": " + formatPowerLong( ns.powerUsage ), 8, 26, 4210752 );
|
||||
|
||||
int sectionLength = 30;
|
||||
|
||||
@@ -138,8 +138,8 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
if ( refStack.getStackSize() >= 10000 )
|
||||
str = Long.toString( refStack.getStackSize() / 1000 ) + StatCollector.translateToLocal( "AppEng.Sizes.1000" );
|
||||
|
||||
int w = fontRenderer.getStringWidth( str );
|
||||
fontRenderer.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * 18 + yo + 6) * 2),
|
||||
int w = fontRendererObj.getStringWidth( str );
|
||||
fontRendererObj.drawString( str, (int) ((x * sectionLength + xo + sectionLength - 19 - ((float) w * 0.5)) * 2), (int) ((y * 18 + yo + 6) * 2),
|
||||
4210752 );
|
||||
|
||||
GL11.glPopMatrix();
|
||||
@@ -216,7 +216,6 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
// Vanillia version...
|
||||
@Override
|
||||
protected void drawItemStackTooltip(ItemStack stack, int x, int y)
|
||||
{
|
||||
Slot s = getSlot( x, y );
|
||||
@@ -246,7 +245,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
drawTooltip( x, y, 0, join( currenttip, "\n" ) );
|
||||
}
|
||||
}
|
||||
super.drawItemStackTooltip( stack, x, y );
|
||||
// super.drawItemStackTooltip( stack, x, y );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,8 +24,8 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.NetworkTool.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.NetworkTool.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import appeng.tile.storage.TileChest;
|
||||
import appeng.tile.storage.TileDrive;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiPriority extends AEBaseGui
|
||||
{
|
||||
@@ -74,9 +74,9 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if ( OriginalGui != null )
|
||||
buttonList.add( originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRenderer ) );
|
||||
buttonList.add( originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||
|
||||
priority = new GuiTextField( this.fontRenderer, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRenderer.FONT_HEIGHT );
|
||||
priority = new GuiTextField( fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, fontRendererObj.FONT_HEIGHT );
|
||||
priority.setEnableBackgroundDrawing( false );
|
||||
priority.setMaxStringLength( 16 );
|
||||
priority.setTextColor( 0xFFFFFF );
|
||||
@@ -94,7 +94,7 @@ public class GuiPriority extends AEBaseGui
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketSwitchGuis( OriginalGui )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( OriginalGui ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ public class GuiPriority extends AEBaseGui
|
||||
|
||||
priority.setText( Out = Long.toString( result ) );
|
||||
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "PriorityHost.Priority", Out )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", Out ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -157,7 +157,8 @@ 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 ) )
|
||||
if ( (key == 211 || key == 205 || key == 203 || key == 14 || character == '-' || Character.isDigit( character ))
|
||||
&& priority.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -176,7 +177,7 @@ public class GuiPriority extends AEBaseGui
|
||||
if ( Out.length() == 0 )
|
||||
Out = "0";
|
||||
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "PriorityHost.Priority", Out )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", Out ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -207,6 +208,6 @@ public class GuiPriority extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Priority.getLocal(), 8, 6, 4210752 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ public class GuiQNB extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.QuantumLinkChamber.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.QuantumLinkChamber.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.container.implementations.ContainerSecurity;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiSecurity extends GuiMEMonitorable
|
||||
{
|
||||
@@ -31,11 +31,11 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
super.initGui();
|
||||
|
||||
int top = this.guiTop + this.ySize - 116;
|
||||
buttonList.add( inject = new GuiToggleButton( this.guiLeft + 56 + 18 * 0, top, 11 * 16 + 0, 12 * 16 + 0, SecurityPermissions.INJECT.getUnlocalizedName(),
|
||||
SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
buttonList.add( inject = new GuiToggleButton( this.guiLeft + 56 + 18 * 0, top, 11 * 16 + 0, 12 * 16 + 0, SecurityPermissions.INJECT
|
||||
.getUnlocalizedName(), SecurityPermissions.INJECT.getUnlocalizedTip() ) );
|
||||
|
||||
buttonList.add( extract = new GuiToggleButton( this.guiLeft + 56 + 18 * 1, top, 11 * 16 + 1, 12 * 16 + 1, SecurityPermissions.EXTRACT.getUnlocalizedName(),
|
||||
SecurityPermissions.EXTRACT.getUnlocalizedTip() ) );
|
||||
buttonList.add( extract = new GuiToggleButton( this.guiLeft + 56 + 18 * 1, 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(),
|
||||
SecurityPermissions.CRAFT.getUnlocalizedTip() ) );
|
||||
@@ -43,8 +43,8 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
buttonList.add( 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.getUnlocalizedName(),
|
||||
SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
buttonList.add( security = new GuiToggleButton( this.guiLeft + 56 + 18 * 4, top, 11 * 16 + 4, 12 * 16 + 4, SecurityPermissions.SECURITY
|
||||
.getUnlocalizedName(), SecurityPermissions.SECURITY.getUnlocalizedTip() ) );
|
||||
}
|
||||
|
||||
protected void actionPerformed(net.minecraft.client.gui.GuiButton btn)
|
||||
@@ -68,7 +68,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketValueConfig( "TileSecurity.ToggleOption", toggleSetting.name() )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "TileSecurity.ToggleOption", toggleSetting.name() ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
fontRenderer.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.SecurityCardEditor.getLocal(), 8, ySize - 96 + 1 - reservedSpace, 4210752 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,8 +24,8 @@ public class GuiSpatialIOPort extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.SpatialIOPort.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.SpatialIOPort.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@ import appeng.container.implementations.ContainerStorageBus;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.core.sync.packets.PacketSwitchGuis;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiStorageBus extends GuiUpgradeable
|
||||
{
|
||||
@@ -41,8 +41,8 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.StorageBus.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.StorageBus.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( fuzzyMode != null )
|
||||
fuzzyMode.set( cvb.fzMode );
|
||||
@@ -57,7 +57,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
fuzzyMode = new GuiImgButton( this.guiLeft - 18, guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
rwMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.ACCESS, AccessRestriction.READ_WRITE );
|
||||
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRenderer ) );
|
||||
buttonList.add( priority = new GuiTabButton( this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(), itemRender ) );
|
||||
|
||||
buttonList.add( fuzzyMode );
|
||||
buttonList.add( rwMode );
|
||||
@@ -74,7 +74,7 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
{
|
||||
try
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer( (new PacketSwitchGuis( GuiBridge.GUI_PRIORITY )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
@@ -84,10 +84,10 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
try
|
||||
{
|
||||
if ( btn == fuzzyMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( fuzzyMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == rwMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( rwMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( rwMode.getSetting(), backwards ) );
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -17,9 +17,9 @@ import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.parts.automation.PartImportBus;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
@@ -69,10 +69,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
try
|
||||
{
|
||||
if ( btn == redstoneMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( redstoneMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( redstoneMode.getSetting(), backwards ) );
|
||||
|
||||
if ( btn == fuzzyMode )
|
||||
PacketDispatcher.sendPacketToServer( (new PacketConfigButton( fuzzyMode.getSetting(), backwards )).getPacket() );
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( fuzzyMode.getSetting(), backwards ) );
|
||||
|
||||
}
|
||||
catch (IOException e)
|
||||
@@ -120,8 +120,8 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( getName().getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( getName().getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
||||
if ( redstoneMode != null )
|
||||
redstoneMode.set( cvb.rsMode );
|
||||
|
||||
@@ -44,8 +44,8 @@ public class GuiVibrationChamber extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.VibrationChamber.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.VibrationChamber.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
|
||||
int k = 25;
|
||||
int l = -15;
|
||||
|
||||
@@ -24,8 +24,8 @@ public class GuiWireless extends AEBaseGui
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY)
|
||||
{
|
||||
fontRenderer.drawString( GuiText.Wireless.getLocal(), 8, 6, 4210752 );
|
||||
fontRenderer.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.Wireless.getLocal(), 8, 6, 4210752 );
|
||||
fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,18 +72,18 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
static private Map<EnumPair, BtnAppearance> Appearances;
|
||||
|
||||
private void registerApp(int icon, Settings setting, Enum val, ButtonToolTips title, Object hint)
|
||||
private void registerApp(int IIcon, Settings setting, Enum val, ButtonToolTips title, Object hint)
|
||||
{
|
||||
BtnAppearance a = new BtnAppearance();
|
||||
a.DisplayName = title.getUnlocalized();
|
||||
a.DisplayValue = (String) (hint instanceof String ? hint : ((ButtonToolTips) hint).getUnlocalized());
|
||||
a.index = icon;
|
||||
a.index = IIcon;
|
||||
Appearances.put( new EnumPair( setting, val ), a );
|
||||
}
|
||||
|
||||
public void setVisibility(boolean vis)
|
||||
{
|
||||
drawButton = vis;
|
||||
visible = vis;
|
||||
enabled = vis;
|
||||
}
|
||||
|
||||
@@ -174,13 +174,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public boolean isVisible()
|
||||
{
|
||||
return drawButton;
|
||||
return visible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3)
|
||||
{
|
||||
if ( this.drawButton )
|
||||
if ( this.visible )
|
||||
{
|
||||
int iconIndex = getIconIndex();
|
||||
|
||||
@@ -195,7 +195,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||
&& par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
@@ -210,7 +211,8 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||
&& par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3)
|
||||
{
|
||||
if ( this.drawButton )
|
||||
if ( this.visible )
|
||||
{
|
||||
par1Minecraft.getTextureManager().bindTexture( texture );
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
|
||||
public void setVisibility(boolean vis)
|
||||
{
|
||||
drawButton = vis;
|
||||
visible = vis;
|
||||
enabled = vis;
|
||||
}
|
||||
|
||||
@@ -53,17 +53,17 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public boolean isVisible()
|
||||
{
|
||||
return drawButton;
|
||||
return visible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3)
|
||||
{
|
||||
if ( this.drawButton )
|
||||
if ( this.visible )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( 13 / 16 );
|
||||
int uv_x = 13 - uv_y * 16;
|
||||
|
||||
@@ -26,7 +26,7 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
|
||||
public void setVisibility(boolean vis)
|
||||
{
|
||||
drawButton = vis;
|
||||
visible = vis;
|
||||
enabled = vis;
|
||||
}
|
||||
|
||||
@@ -45,19 +45,19 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
@Override
|
||||
public boolean isVisible()
|
||||
{
|
||||
return drawButton;
|
||||
return visible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3)
|
||||
{
|
||||
if ( this.drawButton )
|
||||
if ( this.visible )
|
||||
{
|
||||
int iconIndex = getIconIndex();
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
par1Minecraft.renderEngine.bindTexture( ExtraTextures.GuiTexture( "guis/states.png" ) );
|
||||
this.field_82253_i = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||
|
||||
int uv_y = (int) Math.floor( iconIndex / 16 );
|
||||
int uv_x = iconIndex - uv_y * 16;
|
||||
|
||||
Reference in New Issue
Block a user