From 24d497e583db7d14fc84fec9fe2e0f8943ef2609 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Tue, 6 May 2014 21:21:12 -0500 Subject: [PATCH] MAC Gui upgrade slots and network tool fixes. --- client/gui/implementations/GuiMAC.java | 32 ++++++++++++--------- container/implementations/ContainerMAC.java | 5 ++++ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/client/gui/implementations/GuiMAC.java b/client/gui/implementations/GuiMAC.java index fa923bab..83574b41 100644 --- a/client/gui/implementations/GuiMAC.java +++ b/client/gui/implementations/GuiMAC.java @@ -1,32 +1,36 @@ package appeng.client.gui.implementations; import net.minecraft.entity.player.InventoryPlayer; -import appeng.client.gui.AEBaseGui; +import appeng.api.config.RedstoneMode; +import appeng.api.config.Settings; +import appeng.client.gui.widgets.GuiImgButton; import appeng.container.implementations.ContainerMAC; import appeng.core.localization.GuiText; import appeng.tile.crafting.TileMolecularAssembler; -public class GuiMAC extends AEBaseGui +public class GuiMAC extends GuiUpgradeable { + @Override + protected void addButtons() + { + redstoneMode = new GuiImgButton( this.guiLeft - 18, guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE ); + buttonList.add( redstoneMode ); + } + + protected String getBackground() + { + return "guis/mac.png"; + } + public GuiMAC(InventoryPlayer inventoryPlayer, TileMolecularAssembler te) { super( new ContainerMAC( inventoryPlayer, te ) ); this.ySize = 197; this.xSize = 211; } - @Override - public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY) + protected GuiText getName() { - bindTexture( "guis/mac.png" ); - this.drawTexturedModalRect( offsetX, offsetY, 0, 0, xSize, ySize ); + return GuiText.MolecularAssembler; } - - @Override - public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) - { - fontRendererObj.drawString( getGuiDisplayName( GuiText.MolecularAssembler.getLocal() ), 8, 6, 4210752 ); - fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, ySize - 96 + 3, 4210752 ); - } - } diff --git a/container/implementations/ContainerMAC.java b/container/implementations/ContainerMAC.java index c4137c36..f6bb8e18 100644 --- a/container/implementations/ContainerMAC.java +++ b/container/implementations/ContainerMAC.java @@ -24,6 +24,11 @@ public class ContainerMAC extends ContainerUpgradeable super( ip, te ); } + public int availableUpgrades() + { + return 5; + } + @Override protected int getHeight() {