Skip to content

Commit

Permalink
Fix incorrect fluid tank rendering in gui
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jan 5, 2025
1 parent c68271a commit ba1e032
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void renderFluidTank(GuiGraphics gui, FluidVariant fluidStack, long amoun

Lighting.setupForFlatItems();
RenderSystem.setShaderColor(colorParts.getLeft(), colorParts.getMiddle(), colorParts.getRight(), 1);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, 0, width, textureHeight);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, width, textureHeight);
gui.flush();
Lighting.setupFor3DItems();
RenderSystem.setShaderColor(1, 1, 1, 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public void renderFluidTank(GuiGraphics gui, @Nullable FluidStack fluidStack, in

Lighting.setupForFlatItems();
RenderSystem.setShaderColor(colorParts.getLeft(), colorParts.getMiddle(), colorParts.getRight(), 1);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, 0, width, textureHeight);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, width, textureHeight);
gui.flush();
Lighting.setupFor3DItems();
RenderSystem.setShaderColor(1, 1, 1, 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public GuiHelpersNeoForge(IModHelpers modHelpers) {

@Override
public void renderFluidTank(GuiGraphics gui, @Nullable FluidStack fluidStack, int capacity,
int x, int y, int width, int height) {
int x, int y, int width, int height) {
if (fluidStack != null && !fluidStack.isEmpty() && capacity > 0) {
gui.pose().pushPose();
GlStateManager._enableBlend();
Expand Down Expand Up @@ -61,7 +61,8 @@ public void renderFluidTank(GuiGraphics gui, @Nullable FluidStack fluidStack, in

Lighting.setupForFlatItems();
RenderSystem.setShaderColor(colorParts.getLeft(), colorParts.getMiddle(), colorParts.getRight(), 1);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, 0, width, textureHeight);
gui.blitSprite(RenderType::guiTextured, icon, x, y - textureHeight - verticalOffset + height, width, textureHeight);
gui.flush();
Lighting.setupFor3DItems();
RenderSystem.setShaderColor(1, 1, 1, 1);

Expand Down

0 comments on commit ba1e032

Please sign in to comment.