@@ -106,6 +106,12 @@ public void drawBackground(ModularGuiContext context, WidgetTheme widgetTheme) {
106106
107107 @ Override
108108 public void draw (ModularGuiContext context , WidgetTheme widgetTheme ) {
109+ if (widgetTheme instanceof WidgetSlotTheme slotTheme ) {
110+ draw (context , slotTheme );
111+ }
112+ }
113+
114+ public void draw (ModularGuiContext context , WidgetSlotTheme widgetTheme ) {
109115 FluidStack content = this .syncHandler .getFluid ();
110116 if (content == null && this .syncHandler .canLockFluid ())
111117 content = this .syncHandler .getLockedFluid ();
@@ -121,7 +127,7 @@ public void draw(ModularGuiContext context, WidgetTheme widgetTheme) {
121127
122128 if (isHovering ()) {
123129 GlStateManager .colorMask (true , true , true , false );
124- GuiDraw .drawRect (1 , 1 , getArea ().w () - 2 , getArea ().h () - 2 , getSlotHoverColor ());
130+ GuiDraw .drawRect (1 , 1 , getArea ().w () - 2 , getArea ().h () - 2 , widgetTheme . getSlotHoverColor ());
125131 GlStateManager .colorMask (true , true , true , true );
126132 }
127133 }
@@ -167,14 +173,6 @@ protected WidgetTheme getWidgetThemeInternal(ITheme theme) {
167173 return theme .getFluidSlotTheme ();
168174 }
169175
170- public int getSlotHoverColor () {
171- WidgetTheme theme = getWidgetTheme (getContext ().getTheme ());
172- if (theme instanceof WidgetSlotTheme slotTheme ) {
173- return slotTheme .getSlotHoverColor ();
174- }
175- return ITheme .getDefault ().getFluidSlotTheme ().getSlotHoverColor ();
176- }
177-
178176 public static void addIngotMolFluidTooltip (FluidStack fluidStack , RichTooltip tooltip ) {
179177 // Add tooltip showing how many "ingot moles" (increments of 144) this fluid is if shift is held
180178 if (TooltipHelper .isShiftDown () && fluidStack .amount > GTValues .L ) {
0 commit comments