@@ -140,6 +140,14 @@ protected void renderList(MatrixStack matrices, int mouseX, int mouseY, float de
140140 }
141141 }
142142
143+ @ Override
144+ public void render (MatrixStack matrices , int mouseX , int mouseY , float delta ) {
145+ super .render (matrices , mouseX , mouseY , delta );
146+ for (Entry entry : children ()) {
147+ entry .postRender (matrices , mouseX , mouseY , delta );
148+ }
149+ }
150+
143151 /* END cloth config code */
144152
145153 @ Override
@@ -206,6 +214,10 @@ public List<Entry> children() {
206214 }
207215
208216 public abstract class Entry extends ElementListWidget .Entry <Entry > {
217+ public void postRender (MatrixStack matrices , int mouseX , int mouseY , float delta ) {
218+
219+ }
220+
209221 public boolean isViewable () {
210222 return true ;
211223 }
@@ -235,6 +247,11 @@ public void render(MatrixStack matrices, int index, int y, int x, int entryWidth
235247 widget .render (matrices , mouseX , mouseY , tickDelta );
236248 }
237249
250+ @ Override
251+ public void postRender (MatrixStack matrices , int mouseX , int mouseY , float delta ) {
252+ widget .postRender (matrices , mouseX , mouseY , delta );
253+ }
254+
238255 @ Override
239256 public boolean mouseScrolled (double mouseX , double mouseY , double amount ) {
240257 return widget .mouseScrolled (mouseX , mouseY , amount );
@@ -314,14 +331,17 @@ public void render(MatrixStack matrices, int index, int y, int x, int entryWidth
314331
315332 wrappedName .drawCenterWithShadow (matrices , x + entryWidth / 2 , y + getYPadding ());
316333
317- if (hoveredTicks >= YACLConstants .HOVER_TICKS ) {
318- screen .renderOrderedTooltip (matrices , wrappedTooltip , x - 6 , y + entryHeight / 2 + 6 + (wrappedTooltip .size () * textRenderer .fontHeight ) / 2 );
319- }
320-
321334 prevMouseX = mouseX ;
322335 prevMouseY = mouseY ;
323336 }
324337
338+ @ Override
339+ public void postRender (MatrixStack matrices , int mouseX , int mouseY , float delta ) {
340+ if (hoveredTicks >= YACLConstants .HOVER_TICKS ) {
341+ screen .renderOrderedTooltip (matrices , wrappedTooltip , mouseX , mouseY );
342+ }
343+ }
344+
325345 public boolean isExpanded () {
326346 return groupExpanded ;
327347 }
0 commit comments