@@ -236,6 +236,7 @@ protected void init() {
236236 this .height - RIGHT_PANE_Y - 96 ,
237237 RIGHT_PANE_Y + 60 ,
238238 textRenderer .fontHeight + 1 ,
239+ this .descriptionListWidget ,
239240 this
240241 );
241242 this .descriptionListWidget .setX (this .rightPaneX );
@@ -247,7 +248,7 @@ protected void init() {
247248 ClickableWidget doneButton = ButtonWidget .builder (ScreenTexts .DONE , button -> client .setScreen (previousScreen )).position (this .width / 2 + 4 , this .height - 28 ).size (150 , 20 ).build ();
248249
249250 // Initialize data
250- modList .reloadFilters ();
251+ modList .finalizeInit ();
251252 this .setFilterOptionsShown (this .keepFilterOptionsShown && this .filterOptionsShown );
252253
253254 // Add children
@@ -521,35 +522,38 @@ public ModListEntry getSelectedEntry() {
521522 }
522523
523524 public void updateSelectedEntry (ModListEntry entry ) {
524- if (entry != null ) {
525- this .selected = entry ;
526- String modId = selected .getMod ().getId ();
527- if (this .configureButton != null ) {
528- this .configureButton .active = getModHasConfigScreen (modId );
529- this .configureButton .visible = selected != null && getModHasConfigScreen (modId ) || modScreenErrors .containsKey (modId );
530- if (modScreenErrors .containsKey (modId )) {
531- Throwable e = modScreenErrors .get (modId );
532- this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .configureError (modId , e )));
533- } else {
534- this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .CONFIGURE ));
535- }
536- }
525+ if (entry == null ) {
526+ return ;
527+ }
528+
529+ this .selected = entry ;
530+ String modId = selected .getMod ().getId ();
531+
532+ this .descriptionListWidget .updateSelectedModIfRequired (selected .getMod ());
537533
538- var isMinecraft = modId .equals ("minecraft" );
539- if (isMinecraft ) {
540- this .websiteButton .setMessage (SEND_FEEDBACK_TEXT );
541- this .issuesButton .setMessage (REPORT_BUGS_TEXT );
534+ if (this .configureButton != null ) {
535+
536+ this .configureButton .active = getModHasConfigScreen (modId );
537+ this .configureButton .visible =
538+ selected != null && getModHasConfigScreen (modId ) || modScreenErrors .containsKey (modId );
539+
540+ if (modScreenErrors .containsKey (modId )) {
541+ Throwable e = modScreenErrors .get (modId );
542+ this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .configureError (modId , e )));
542543 } else {
543- this .websiteButton .setMessage (ModMenuScreenTexts .WEBSITE );
544- this .issuesButton .setMessage (ModMenuScreenTexts .ISSUES );
544+ this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .CONFIGURE ));
545545 }
546+ }
546547
547- this .websiteButton .visible = true ;
548- this .websiteButton .active = isMinecraft || selected .getMod ().getWebsite () != null ;
548+ boolean isMinecraft = modId .equals ("minecraft" );
549+ this .websiteButton .setMessage (isMinecraft ? SEND_FEEDBACK_TEXT : ModMenuScreenTexts .WEBSITE );
550+ this .issuesButton .setMessage (isMinecraft ? REPORT_BUGS_TEXT : ModMenuScreenTexts .ISSUES );
549551
550- this .issuesButton .visible = true ;
551- this .issuesButton .active = isMinecraft || selected .getMod ().getIssueTracker () != null ;
552- }
552+ this .websiteButton .visible = true ;
553+ this .websiteButton .active = isMinecraft || selected .getMod ().getWebsite () != null ;
554+
555+ this .issuesButton .visible = true ;
556+ this .issuesButton .active = isMinecraft || selected .getMod ().getIssueTracker () != null ;
553557 }
554558
555559 public double getScrollPercent () {
0 commit comments