Fix bug with custom Fluids. You can now drown in them!

This commit is contained in:
LexManos committed 2013-08-18 23:16:36 -07:00
1 parent 4b64c15ae8
commit 461a30812b
5 files changed
+83 -12

No files matched your search

@@ -451,4 +451,13 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
{
return FluidRegistry.getFluid(fluidName);
}
@Override
public float getFilledPercentage(World world, int x, int y, int z)
{
int quantaRemaining = getQuantaValue(world, x, y, z) + 1;
float remaining = quantaRemaining / quantaPerBlockFloat;
if (remaining > 1) remaining = 1.0f;
return remaining * (density > 0 ? 1 : -1);
}
}