From 44d5e571167e1a284849284c3f0260d37fa0d150 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Tue, 29 Oct 2013 04:17:46 -0400 Subject: [PATCH] Start on a tread to run the fluid tile networks --- .../common/pipes/ThreadFluidNetwork.java | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/dark/fluid/common/pipes/ThreadFluidNetwork.java diff --git a/src/dark/fluid/common/pipes/ThreadFluidNetwork.java b/src/dark/fluid/common/pipes/ThreadFluidNetwork.java new file mode 100644 index 000000000..8ab89fb2e --- /dev/null +++ b/src/dark/fluid/common/pipes/ThreadFluidNetwork.java @@ -0,0 +1,36 @@ +package dark.fluid.common.pipes; + +import java.util.ArrayList; +import java.util.List; + +import com.builtbroken.common.Pair; + +import dark.core.prefab.tilenetwork.fluid.NetworkFluidTiles; + +public class ThreadFluidNetwork extends Thread +{ + protected static List> storageCalcList = new ArrayList(); + + //TODO create a thread to off load tile network calculation to reduce strain on the main thread. Things to include are fluid container updates, path finding, and fill target finding. + /** Makes a request that this thread calculate the liquid storage locations in the network for + * the entire network's volume + * + * @even - each tile will get the same fluid level. If false physics will be used to calculate + * were the fluid is */ + public static void calculateStorage(NetworkFluidTiles network, boolean even) + { + + } + + public static void sendUpdateToClient(NetworkFluidTiles network) + { + + } + + @Override + public void run() + { + + } + +}