mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-14 08:16:42 +01:00
Merge pull request #4604 from cakeGit/mc1.18/dev
Fix "Lighter than air" fluids display in spouts
This commit is contained in:
commit
83889f7689
1 changed files with 13 additions and 3 deletions
|
@ -38,14 +38,24 @@ public class SpoutRenderer extends SafeTileEntityRenderer<SpoutTileEntity> {
|
||||||
.getValue(partialTicks);
|
.getValue(partialTicks);
|
||||||
|
|
||||||
if (!fluidStack.isEmpty() && level != 0) {
|
if (!fluidStack.isEmpty() && level != 0) {
|
||||||
|
boolean top = fluidStack.getFluid()
|
||||||
|
.getAttributes()
|
||||||
|
.isLighterThanAir();
|
||||||
|
|
||||||
level = Math.max(level, 0.175f);
|
level = Math.max(level, 0.175f);
|
||||||
float min = 2.5f / 16f;
|
float min = 2.5f / 16f;
|
||||||
float max = min + (11 / 16f);
|
float max = min + (11 / 16f);
|
||||||
float yOffset = (11 / 16f) * level;
|
float yOffset = (11 / 16f) * level;
|
||||||
|
|
||||||
ms.pushPose();
|
ms.pushPose();
|
||||||
ms.translate(0, yOffset, 0);
|
if (!top) ms.translate(0, yOffset, 0);
|
||||||
FluidRenderer.renderFluidBox(fluidStack, min, min - yOffset, min, max, min, max, buffer, ms, light,
|
else ms.translate(0, max - min, 0);
|
||||||
false);
|
|
||||||
|
FluidRenderer.renderFluidBox(fluidStack,
|
||||||
|
min, min - yOffset, min,
|
||||||
|
max, min, max,
|
||||||
|
buffer, ms, light, false);
|
||||||
|
|
||||||
ms.popPose();
|
ms.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue