diff --git a/common/mekanism/api/gas/GasNetwork.java b/common/mekanism/api/gas/GasNetwork.java index 3a7e471e1..00722638a 100644 --- a/common/mekanism/api/gas/GasNetwork.java +++ b/common/mekanism/api/gas/GasNetwork.java @@ -63,6 +63,11 @@ public class GasNetwork extends DynamicNetwork gasScale = net.gasScale; } + if(net.definedScale > definedScale) + { + definedScale = net.definedScale; + } + if(net.gasStored != null) { if(gasStored == null) @@ -344,7 +349,7 @@ public class GasNetwork extends DynamicNetwork public float getScale() { - return (gasStored == null || getCapacity() == 0 ? 0 : (float)gasStored.amount/getCapacity()); + return Math.min(1, (gasStored == null || getCapacity() == 0 ? 0 : (float)gasStored.amount/getCapacity())); } @Override @@ -359,6 +364,7 @@ public class GasNetwork extends DynamicNetwork GasNetwork network = new GasNetwork(varTransmitters); network.refGas = refGas; network.gasScale = gasScale; + network.definedScale = definedScale; if(gasStored != null) { @@ -380,6 +386,7 @@ public class GasNetwork extends DynamicNetwork GasNetwork network = new GasNetwork(collection); network.refGas = refGas; network.gasScale = gasScale; + network.definedScale = definedScale; if(gasStored != null) { diff --git a/common/mekanism/client/render/RenderPartTransmitter.java b/common/mekanism/client/render/RenderPartTransmitter.java index e880bf33e..e77042bb0 100644 --- a/common/mekanism/client/render/RenderPartTransmitter.java +++ b/common/mekanism/client/render/RenderPartTransmitter.java @@ -124,6 +124,13 @@ public class RenderPartTransmitter implements IIconRegister public void renderContents(PartMechanicalPipe pipe, Vector3 pos) { + float targetScale = pipe.getTransmitterNetwork().fluidScale; + + if(Math.abs(pipe.currentScale - targetScale) > 0.01) + { + pipe.currentScale = (9 * pipe.currentScale + targetScale) / 10; + } + Fluid fluid = pipe.getTransmitterNetwork().refFluid; float scale = pipe.currentScale; diff --git a/common/mekanism/common/FluidNetwork.java b/common/mekanism/common/FluidNetwork.java index f24eb4928..410b3a6cd 100644 --- a/common/mekanism/common/FluidNetwork.java +++ b/common/mekanism/common/FluidNetwork.java @@ -68,6 +68,11 @@ public class FluidNetwork extends DynamicNetwork fluidScale = net.fluidScale; } + if(net.definedScale > definedScale) + { + definedScale = net.definedScale; + } + if(net.fluidStored != null) { if(fluidStored == null) @@ -350,7 +355,7 @@ public class FluidNetwork extends DynamicNetwork public float getScale() { - return (fluidStored == null || getCapacity() == 0 ? 0 : (float)fluidStored.amount/getCapacity()); + return Math.min(1, (fluidStored == null || getCapacity() == 0 ? 0 : (float)fluidStored.amount/getCapacity())); } @Override @@ -365,6 +370,7 @@ public class FluidNetwork extends DynamicNetwork FluidNetwork network = new FluidNetwork(varTransmitters); network.refFluid = refFluid; network.fluidScale = fluidScale; + network.definedScale = definedScale; if(fluidStored != null) { @@ -386,6 +392,7 @@ public class FluidNetwork extends DynamicNetwork FluidNetwork network = new FluidNetwork(collection); network.refFluid = refFluid; network.fluidScale = fluidScale; + network.definedScale = definedScale; if(fluidStored != null) { diff --git a/common/mekanism/common/multipart/PartMechanicalPipe.java b/common/mekanism/common/multipart/PartMechanicalPipe.java index 4f3e157a8..2d95766eb 100644 --- a/common/mekanism/common/multipart/PartMechanicalPipe.java +++ b/common/mekanism/common/multipart/PartMechanicalPipe.java @@ -76,14 +76,6 @@ public class PartMechanicalPipe extends PartTransmitter implements } } } - else { - float targetScale = getTransmitterNetwork().fluidScale; - - if(Math.abs(currentScale - targetScale) > 0.01) - { - currentScale = (9 * currentScale + targetScale) / 10; - } - } super.update(); }