From 1698e57f729efb52e2b98e865a9671f0b50a5b2e Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 3 Sep 2018 00:57:51 -0700 Subject: Pipe/Cable overhaul & Add filter output on fluid filters * Unified connect() method for pipes/wires - each subclass has it's own canConnect(), letsIn(), and letsOut() methods that map to the specifics for that implementation * Shift Clicking while placing a GT machine will now try connecting to the cable/pipe it is placed on * You can open a connection to the air for pipes & wires, allowing the next thing you place down to auto connect (ie: a JABBA barrel) * Distribute Fluids - Modeled after several of the upstream PRs * Fluid regulators on pipes should stop spazzing out now * Fluid filter covers - Now work with filtering output BUG/TODO: * Spray paint doesn't seem to keep wires/pipes from connecting properly * Spray paint on wires/pipes should force a disconnection check --- src/main/java/gregtech/api/util/GT_Utility.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index daa02d8b85..4a2fa78a62 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -365,9 +365,11 @@ public class GT_Utility { public static boolean isConnectableNonInventoryPipe(Object aTileEntity, int aSide) { if (aTileEntity == null) return false; checkAvailabilities(); - if (TE_CHECK) if (aTileEntity instanceof IItemDuct) return true; - if (BC_CHECK) if (aTileEntity instanceof buildcraft.api.transport.IPipeTile) + if (TE_CHECK && aTileEntity instanceof IItemDuct) return true; + if (BC_CHECK && aTileEntity instanceof buildcraft.api.transport.IPipeTile) return ((buildcraft.api.transport.IPipeTile) aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide)); + if (GregTech_API.mTranslocator && aTileEntity instanceof codechicken.translocator.TileItemTranslocator) return true; + return false; } /** -- cgit