From 3736239658b813255fcc4034a410013a99c57e64 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 16 Apr 2014 11:55:28 -0500 Subject: [PATCH 1/4] Require AE2 Core. --- core/AppEng.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/AppEng.java b/core/AppEng.java index bd3d9a0bc..747998ca0 100644 --- a/core/AppEng.java +++ b/core/AppEng.java @@ -51,6 +51,7 @@ public class AppEng "after:gregtech_addon;after:Mekanism;after:IC2;after:ThermalExpansion;after:BuildCraft|Core;" + // depend on version of forge used for build. + "required-after:AppliedEnergistics2-Core;" + "required-after:Forge@[" // require forge. + net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion + net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion From 9f7e80966225a014feb58bcdd7a0b1e1dd86e219 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 16 Apr 2014 11:59:37 -0500 Subject: [PATCH 2/4] Terminals show now drop View Cells. --- parts/reporting/PartCraftingTerminal.java | 2 ++ parts/reporting/PartTerminal.java | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/parts/reporting/PartCraftingTerminal.java b/parts/reporting/PartCraftingTerminal.java index 7d6d01b04..041a9b33d 100644 --- a/parts/reporting/PartCraftingTerminal.java +++ b/parts/reporting/PartCraftingTerminal.java @@ -33,6 +33,8 @@ public class PartCraftingTerminal extends PartTerminal implements IAEAppEngInven @Override public void getDrops(List drops, boolean wrenched) { + super.getDrops(drops, wrenched); + for (ItemStack is : craftingGrid) if ( is != null ) drops.add( is ); diff --git a/parts/reporting/PartTerminal.java b/parts/reporting/PartTerminal.java index 11806c66a..21e581833 100644 --- a/parts/reporting/PartTerminal.java +++ b/parts/reporting/PartTerminal.java @@ -1,5 +1,7 @@ package appeng.parts.reporting; +import java.util.List; + import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -37,6 +39,16 @@ public class PartTerminal extends PartMonitor implements ITerminalHost, IConfigM cm.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING ); } + @Override + public void getDrops(List drops, boolean wrenched) + { + super.getDrops(drops, wrenched); + + for (ItemStack is : viewCell) + if ( is != null ) + drops.add( is ); + } + @Override public void readFromNBT(NBTTagCompound data) { From 71b5fd4555f1cec434d92efb32fd06f64f182679 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 16 Apr 2014 12:16:21 -0500 Subject: [PATCH 3/4] Hid View Cells on Portable Cell and ME Chest. --- client/gui/implementations/GuiMEMonitorable.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/gui/implementations/GuiMEMonitorable.java b/client/gui/implementations/GuiMEMonitorable.java index f1214cf07..b917842e8 100644 --- a/client/gui/implementations/GuiMEMonitorable.java +++ b/client/gui/implementations/GuiMEMonitorable.java @@ -80,7 +80,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi myScrollBar = new GuiScrollbar(); repo = new ItemRepo( myScrollBar, this ); - xSize = 195; + xSize = 185; ySize = 204; if ( te instanceof IViewCellStorage ) @@ -295,7 +295,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi bindTexture( getBackground() ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 ); - this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 ); + + if ( viewCell ) + this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 ); for (int x = 0; x < rows; x++) this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 ); From f5fc2ba18e32e1fa2e0152bf72da234d82293c49 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Wed, 16 Apr 2014 13:48:03 -0500 Subject: [PATCH 4/4] Removed Terminal style from Portable Cell Gui. Portable Cell now only shows 3 rows now, like it should. Security Gui now has the proper width. Fixed bug introduced in #90 to show background behind security terminal slots. --- .../gui/implementations/GuiMEMonitorable.java | 18 +++++++++++++----- .../gui/implementations/GuiMEPortableCell.java | 6 +++++- client/gui/implementations/GuiSecurity.java | 5 ++++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/client/gui/implementations/GuiMEMonitorable.java b/client/gui/implementations/GuiMEMonitorable.java index b917842e8..673164344 100644 --- a/client/gui/implementations/GuiMEMonitorable.java +++ b/client/gui/implementations/GuiMEMonitorable.java @@ -129,7 +129,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi @Override public void initGui() { - maxRows = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE; + maxRows = getMaxRows(); perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ((width - standardSize) / 18); int NEI = 0; @@ -181,9 +181,12 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi .getSetting( Settings.SEARCH_MODE ) ) ); offset += 20; - buttonList.add( terminalStyleBox = new GuiImgButton( this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, AEConfig.instance.settings - .getSetting( Settings.TERMINAL_STYLE ) ) ); - + if ( !(this instanceof GuiMEPortableCell ) ) + { + buttonList.add( 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( 82, xoffset ), this.guiTop + 6, 89, fontRendererObj.FONT_HEIGHT ); searchField.setEnableBackgroundDrawing( false ); searchField.setMaxStringLength( 25 ); @@ -296,7 +299,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi bindTexture( getBackground() ); this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 ); - if ( viewCell ) + if ( viewCell || ( this instanceof GuiSecurity)) this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 ); for (int x = 0; x < rows; x++) @@ -369,4 +372,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi return repo.hasPower(); } + int getMaxRows() + { + return AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) == TerminalStyle.SMALL ? 6 : Integer.MAX_VALUE; + } + } diff --git a/client/gui/implementations/GuiMEPortableCell.java b/client/gui/implementations/GuiMEPortableCell.java index 8951de738..75531f3b6 100644 --- a/client/gui/implementations/GuiMEPortableCell.java +++ b/client/gui/implementations/GuiMEPortableCell.java @@ -9,7 +9,11 @@ public class GuiMEPortableCell extends GuiMEMonitorable public GuiMEPortableCell(InventoryPlayer inventoryPlayer, IPortableCell te) { super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, null ) ); - maxRows = 3; } + @Override + int getMaxRows() + { + return 3; + } } diff --git a/client/gui/implementations/GuiSecurity.java b/client/gui/implementations/GuiSecurity.java index 31f35d478..8ce92a727 100644 --- a/client/gui/implementations/GuiSecurity.java +++ b/client/gui/implementations/GuiSecurity.java @@ -20,7 +20,10 @@ public class GuiSecurity extends GuiMEMonitorable super( inventoryPlayer, te, new ContainerSecurity( inventoryPlayer, te ) ); customSortOrder = false; reservedSpace = 33; - xSize += 50; + + // increase size so that the slot is over the gui. + xSize += 56; + standardSize = xSize; } GuiToggleButton inject, extract, craft, build, security;