Skip to content

Commit a5f0b7a

Browse files
committed
no longer need to disable hover background
fix GTFluidSlot drawing partial fluids incorrectly
1 parent b8c5e49 commit a5f0b7a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityPrimitiveBlastFurnace.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ protected MultiblockUIFactory createUIFactory() {
118118
.coverChildren()
119119
.mapTo(1, 3, value -> new ItemSlot()
120120
.background(GTGuiTextures.SLOT_PRIMITIVE, importOverlays[value])
121-
// todo why do we need this now?
122-
.disableHoverBackground()
123121
.slot(new ModularSlot(importItems, value)
124122
.slotGroup(importGroup)))
125123
.marginRight(6))
@@ -132,7 +130,6 @@ protected MultiblockUIFactory createUIFactory() {
132130
.coverChildren()
133131
.mapTo(3, 3, value -> new ItemSlot()
134132
.background(GTGuiTextures.SLOT_PRIMITIVE, exportOverlays[value])
135-
.disableHoverBackground()
136133
.slot(new ModularSlot(exportItems, value)
137134
.accessibility(false, true)))));
138135
});

src/main/java/gregtech/common/mui/widget/GTFluidSlot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void draw(ModularGuiContext context, WidgetThemeEntry<?> widgetTheme) {
9393
float amt = content == null ? 0f : content.amount;
9494
float newHeight = height * (amt / this.syncHandler.getCapacity());
9595
y += (int) (height - newHeight);
96-
height = newHeight;
96+
height = (float) Math.ceil(newHeight);
9797
}
9898

9999
GuiDraw.drawFluidTexture(content, 1, y, getArea().w() - 2, height, 0);

0 commit comments

Comments
 (0)