mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Fluid Render Fix
Formatting
This commit is contained in:
1 parent
6397939c9e
commit
a42369e081
1 file changed
+10
-5
@@ -1,4 +1,3 @@
|
||||
|
||||
package net.minecraftforge.fluids;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -29,12 +28,14 @@ public class RenderBlockFluid implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
float total = 0;
|
||||
int count = 0;
|
||||
|
||||
float end = 0;
|
||||
|
||||
for (int i = 0; i < flow.length; i++)
|
||||
{
|
||||
if (flow[i] >= 0.875F)
|
||||
if (flow[i] >= 0.875F && end != 1F)
|
||||
{
|
||||
return flow[i];
|
||||
end = flow[i];
|
||||
}
|
||||
|
||||
if (flow[i] >= 0)
|
||||
@@ -43,7 +44,11 @@ public class RenderBlockFluid implements ISimpleBlockRenderingHandler
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return total / count;
|
||||
|
||||
if (end == 0)
|
||||
end = total / count;
|
||||
|
||||
return end;
|
||||
}
|
||||
|
||||
public float getFluidHeightForRender(IBlockAccess world, int x, int y, int z, BlockFluidBase block)
|
||||
@@ -319,4 +324,4 @@ public class RenderBlockFluid implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
return FluidRegistry.renderIdFluid;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user