This commit is contained in:
cakeGit 2023-03-28 21:51:16 +01:00
parent c2977bbfff
commit cc09f4c634

View file

@ -38,14 +38,24 @@ public class SpoutRenderer extends SafeTileEntityRenderer<SpoutTileEntity> {
.getValue(partialTicks);
if (!fluidStack.isEmpty() && level != 0) {
boolean top = fluidStack.getFluid()
.getAttributes()
.isLighterThanAir();
level = Math.max(level, 0.175f);
float min = 2.5f / 16f;
float max = min + (11 / 16f);
float yOffset = (11 / 16f) * level;
ms.pushPose();
ms.translate(0, yOffset, 0);
FluidRenderer.renderFluidBox(fluidStack, min, min - yOffset, min, max, min, max, buffer, ms, light,
false);
if (!top) ms.translate(0, yOffset, 0);
else ms.translate(0, max - min, 0);
FluidRenderer.renderFluidBox(fluidStack,
min, min - yOffset, min,
max, min, max,
buffer, ms, light, false);
ms.popPose();
}