From 0a7220e5780c04372783c4dd124ceba94ae87d8a Mon Sep 17 00:00:00 2001 From: CrazyPants Date: Sat, 13 Dec 2014 21:37:05 +0800 Subject: [PATCH] Ender Fluid Conduit filters and auto extract can now be used when in/out mode --- ReleaseNotes.txt | 3 +- .../blocks/liquidConduitAdvancedInOut.png | Bin 0 -> 510 bytes .../enderio/conduit/AbstractConduit.java | 6 + .../enderio/conduit/gui/LiquidSettings.java | 125 ++++++++++++------ .../conduit/liquid/EnderLiquidConduit.java | 13 +- .../liquid/EnderLiquidConduitRenderer.java | 6 +- 6 files changed, 109 insertions(+), 44 deletions(-) create mode 100644 resources/assets/enderio/textures/blocks/liquidConduitAdvancedInOut.png diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 6bb9c64a..0eb0ea2d 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -22,7 +22,8 @@ New Changes - #1378 Soul Vial filled in a Powered Spawner now produce identical item stacks to enable their use in auto crafting systems -- Updated implementation of RF API to correctly handle IEnergyReceivers that are not IEnergyHandlers +- Ender Fluid Conduit filters and auto extract can now be used when in/out mode +- Updated implementation of RF API to send power to IEnergyReceivers that are not IEnergyHandlers - SAG Mill no longer produces dusts for metals that are not available - Corrected Experience Obelisk tooltip - Improved recipe support for Thermal Foundation/Expansion in the SAG Mill and Alloy Smelter diff --git a/resources/assets/enderio/textures/blocks/liquidConduitAdvancedInOut.png b/resources/assets/enderio/textures/blocks/liquidConduitAdvancedInOut.png new file mode 100644 index 0000000000000000000000000000000000000000..5924befe624679a8ac2dfa444215dc0d79906c61 GIT binary patch literal 510 zcmVN2bPDNB8 zb~7$DE-^4L^m3s900DYQL_t(YOVyNJXG1{{hF_wDked?vH_q=1rAjHGN+}gWC{;@7 zO(^|qeY)?Sl}N+s?4FB`5t}({o}Ev1Bg=mVT7;B+l*((jY>&|_{Ag9~v0zTPx_*9_(GsWc}&rm!LojO}3@T&@Lt%`Z>`h{HkD0xYBgkN8EMr58>VTB9}U2p{c5Ba4c?9 zcPeMMP;D0-i=CoOfM*S3OMqo`K#@4W$sH&WfEO7$gcJcd#jYm}<90kHL4aM;k@Te- zlym-kC=meOnIrc;ljUuSGI3b)rCuTc-p<3>2W$nLvLU=yy*4;w&sSpro^JqeXS;bL z?Jqv|AQpn-auom ICONS = new HashMap(); @@ -48,6 +49,7 @@ public class EnderLiquidConduit extends AbstractLiquidConduit { ICONS.put(ICON_CORE_KEY, register.registerIcon(ICON_CORE_KEY)); ICONS.put(ICON_EXTRACT_KEY, register.registerIcon(ICON_EXTRACT_KEY)); ICONS.put(ICON_INSERT_KEY, register.registerIcon(ICON_INSERT_KEY)); + ICONS.put(ICON_IN_OUT_KEY, register.registerIcon(ICON_IN_OUT_KEY)); } @Override @@ -167,6 +169,10 @@ public class EnderLiquidConduit extends AbstractLiquidConduit { return ICONS.get(ICON_INSERT_KEY); } + public IIcon getTextureForInOutMode() { + return ICONS.get(ICON_IN_OUT_KEY); + } + @Override public IIcon getTransmitionTextureForState(CollidableComponent component) { return null; @@ -217,9 +223,14 @@ public class EnderLiquidConduit extends AbstractLiquidConduit { doExtract(); } + @Override + public boolean isExtractingFromDir(ForgeDirection dir) { + return getConnectionMode(dir).acceptsInput(); + } + private void doExtract() { BlockCoord loc = getLocation(); - if(!hasConnectionMode(ConnectionMode.INPUT)) { + if(!hasConnectionMode(ConnectionMode.INPUT) && !hasConnectionMode(ConnectionMode.IN_OUT)) { return; } if(network == null) { diff --git a/src/main/java/crazypants/enderio/conduit/liquid/EnderLiquidConduitRenderer.java b/src/main/java/crazypants/enderio/conduit/liquid/EnderLiquidConduitRenderer.java index 8ca72e38..449edd0c 100644 --- a/src/main/java/crazypants/enderio/conduit/liquid/EnderLiquidConduitRenderer.java +++ b/src/main/java/crazypants/enderio/conduit/liquid/EnderLiquidConduitRenderer.java @@ -25,10 +25,6 @@ public class EnderLiquidConduitRenderer extends DefaultConduitRenderer { public void renderEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit conduit, double x, double y, double z, float partialTick, float worldLight) { super.renderEntity(conduitBundleRenderer, te, conduit, x, y, z, partialTick, worldLight); - - if(!conduit.hasConnectionMode(ConnectionMode.INPUT) && !conduit.hasConnectionMode(ConnectionMode.OUTPUT)) { - return; - } EnderLiquidConduit pc = (EnderLiquidConduit) conduit; for (ForgeDirection dir : conduit.getExternalConnections()) { IIcon tex = null; @@ -36,6 +32,8 @@ public class EnderLiquidConduitRenderer extends DefaultConduitRenderer { tex = pc.getTextureForInputMode(); } else if(conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) { tex = pc.getTextureForOutputMode(); + } else if(conduit.getConnectionMode(dir) == ConnectionMode.IN_OUT) { + tex = pc.getTextureForInOutMode(); } if(tex != null) { Offset offset = te.getOffset(ILiquidConduit.class, dir);