Skip to content

Commit a27e8f2

Browse files
authored
Fix partial rendering position with fluid slot (#127)
1 parent 5ad9d25 commit a27e8f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/cleanroommc/modularui/widgets/FluidSlot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@ public void draw(ModularGuiContext context, WidgetTheme widgetTheme) {
128128
IFluidTank fluidTank = getFluidTank();
129129
FluidStack content = this.syncHandler.getValue();
130130
if (content != null) {
131-
int y = this.contentOffsetY;
131+
float y = this.contentOffsetY;
132132
float height = getArea().height - y * 2;
133133
if (!this.alwaysShowFull) {
134134
float newHeight = height * content.amount * 1f / fluidTank.getCapacity();
135-
y += (int) (height - newHeight);
135+
y += height - newHeight;
136136
height = newHeight;
137137
}
138138
GuiDraw.drawFluidTexture(content, this.contentOffsetX, y, getArea().width - this.contentOffsetX * 2, height, 0);

0 commit comments

Comments
 (0)