Fluid Render Fix
Formatting
This commit is contained in:
parent
6397939c9e
commit
a42369e081
1 changed files with 10 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue