Ported to 1.7
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user