mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-26 15:03:04 +00:00
Fix bug with custom Fluids. You can now drown in them!
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user