From b36f382fa426f297675e2c37305ede272f090149 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Wed, 10 Dec 2014 22:38:18 +0800 Subject: [PATCH] Fixed tanks and gutters affected by pressure --- .../resonantinduction/archaic/fluid/gutter/TileGutter.scala | 1 + .../scala/resonantinduction/archaic/fluid/tank/TileTank.scala | 1 + .../core/prefab/node/NodeFluidPressure.scala | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/resonantinduction/archaic/fluid/gutter/TileGutter.scala b/src/main/scala/resonantinduction/archaic/fluid/gutter/TileGutter.scala index ad3ab713d..b49efaae9 100644 --- a/src/main/scala/resonantinduction/archaic/fluid/gutter/TileGutter.scala +++ b/src/main/scala/resonantinduction/archaic/fluid/gutter/TileGutter.scala @@ -47,6 +47,7 @@ object TileGutter class TileGutter extends TileFluidProvider(Material.rock) { fluidNode = new NodeGutter(this) + fluidNode.asInstanceOf[NodeGutter].doPressureUpdate = false fluidNode.onFluidChanged = () => { if (!world.isRemote) diff --git a/src/main/scala/resonantinduction/archaic/fluid/tank/TileTank.scala b/src/main/scala/resonantinduction/archaic/fluid/tank/TileTank.scala index 5baea5836..4c2c404cb 100644 --- a/src/main/scala/resonantinduction/archaic/fluid/tank/TileTank.scala +++ b/src/main/scala/resonantinduction/archaic/fluid/tank/TileTank.scala @@ -51,6 +51,7 @@ class TileTank extends TileFluidProvider(Material.iron) with ISneakPickup with R } fluidNode.asInstanceOf[NodeFluidGravity].maxFlowRate = FluidContainerRegistry.BUCKET_VOLUME + fluidNode.asInstanceOf[NodeFluidGravity].doPressureUpdate = false fluidNode.onFluidChanged = () => if(!world.isRemote) sendPacket(0) override def shouldSideBeRendered(access: IBlockAccess, x: Int, y: Int, z: Int, side: Int): Boolean = new Vector3(x, y, z).getBlock(access) != block diff --git a/src/main/scala/resonantinduction/core/prefab/node/NodeFluidPressure.scala b/src/main/scala/resonantinduction/core/prefab/node/NodeFluidPressure.scala index d8aece9d7..79b5294c9 100644 --- a/src/main/scala/resonantinduction/core/prefab/node/NodeFluidPressure.scala +++ b/src/main/scala/resonantinduction/core/prefab/node/NodeFluidPressure.scala @@ -21,6 +21,7 @@ class NodeFluidPressure(parent: INodeProvider, volume: Int = FluidContainerRegis { var maxFlowRate = 1000 var maxPressure = 100 + var doPressureUpdate = true private var _pressure: Int = 0 override def reconstruct() @@ -33,7 +34,8 @@ class NodeFluidPressure(parent: INodeProvider, volume: Int = FluidContainerRegis { if (!world.isRemote) { - updatePressure() + if (doPressureUpdate) + updatePressure() distribute(deltaTime) } }