Fix rendering bug with Crucible and Barrel

This commit is contained in:
thedarkcolour 2024-06-12 10:43:51 -07:00
parent 605dd36cb2
commit 4c7a15b625
No known key found for this signature in database
GPG Key ID: 6599A8E0516C8F38
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ public class BarrelRenderer implements BlockEntityRenderer<BarrelBlockEntity> {
g = (int) Mth.lerp(compostProgress, g, 169); // default green is
b = (int) Mth.lerp(compostProgress, b, 109); // default green is
RenderUtil.renderFlatSpriteLerp(builder, stack, barrel.compost / 1000.0f, r, g, b, sprite, light, 2.0f, BarrelBlock.BARREL_FLUID_BOTTOM, BarrelBlock.BARREL_FLUID_TOP);
RenderUtil.renderFlatSpriteLerp(builder, stack, barrel.compost / 1000.0f, r, g, b, sprite, light, 2.0f, BarrelBlock.BARREL_FLUID_BOTTOM * 16f, BarrelBlock.BARREL_FLUID_TOP * 16f);
}
}
}

View File

@ -73,7 +73,7 @@ public class CrucibleRenderer implements BlockEntityRenderer<AbstractCrucibleBlo
if (color == -1) color = 0xffffff;
// todo 3D solids for transparent crucibles
face.renderFlatSpriteLerp(buffers, stack, solids, (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff, light, 2.0f, AbstractCrucibleBlock.CRUCIBLE_FLUID_BOTTOM, AbstractCrucibleBlock.CRUCIBLE_FLUID_TOP);
face.renderFlatSpriteLerp(buffers, stack, solids, (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff, light, 2.0f, AbstractCrucibleBlock.CRUCIBLE_FLUID_BOTTOM * 16f, AbstractCrucibleBlock.CRUCIBLE_FLUID_TOP * 16f);
}
}
});