Skip to content

Commit

Permalink
Fix partial rendering position with fluid slot (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune authored Mar 8, 2025
1 parent 5ad9d25 commit a27e8f2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ public void draw(ModularGuiContext context, WidgetTheme widgetTheme) {
IFluidTank fluidTank = getFluidTank();
FluidStack content = this.syncHandler.getValue();
if (content != null) {
int y = this.contentOffsetY;
float y = this.contentOffsetY;
float height = getArea().height - y * 2;
if (!this.alwaysShowFull) {
float newHeight = height * content.amount * 1f / fluidTank.getCapacity();
y += (int) (height - newHeight);
y += height - newHeight;
height = newHeight;
}
GuiDraw.drawFluidTexture(content, this.contentOffsetX, y, getArea().width - this.contentOffsetX * 2, height, 0);
Expand Down

0 comments on commit a27e8f2

Please sign in to comment.