@@ -241,6 +241,7 @@ protected void init() {
241241 this .height - RIGHT_PANE_Y - 96 ,
242242 RIGHT_PANE_Y + 60 ,
243243 textRenderer .fontHeight + 1 ,
244+ this .descriptionListWidget ,
244245 this
245246 );
246247 this .descriptionListWidget .setX (this .rightPaneX );
@@ -256,7 +257,7 @@ protected void init() {
256257 }).position (this .width / 2 + 4 , this .height - 28 ).size (150 , 20 ).build ();
257258
258259 // Initialize data
259- modList .reloadFilters ();
260+ modList .finalizeInit ();
260261 this .setFilterOptionsShown (this .keepFilterOptionsShown && this .filterOptionsShown );
261262
262263 // Add children
@@ -514,40 +515,38 @@ public ModListEntry getSelectedEntry() {
514515 }
515516
516517 public void updateSelectedEntry (ModListEntry entry ) {
517- if (entry ! = null ) {
518- this . selected = entry ;
519- String modId = selected . getMod (). getId ();
518+ if (entry = = null ) {
519+ return ;
520+ }
520521
521- if (this .configureButton != null ) {
522+ this .selected = entry ;
523+ String modId = selected .getMod ().getId ();
522524
523- this .configureButton .active = getModHasConfigScreen (modId );
524- this .configureButton .visible =
525- selected != null && getModHasConfigScreen (modId ) || modScreenErrors .containsKey (modId );
525+ this .descriptionListWidget .updateSelectedModIfRequired (selected .getMod ());
526526
527- if (modScreenErrors .containsKey (modId )) {
528- Throwable e = modScreenErrors .get (modId );
529- this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .configureError (modId , e )));
530- } else {
531- this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .CONFIGURE ));
532- }
533- }
527+ if (this .configureButton != null ) {
534528
535- var isMinecraft = modId .equals ("minecraft" );
529+ this .configureButton .active = getModHasConfigScreen (modId );
530+ this .configureButton .visible =
531+ selected != null && getModHasConfigScreen (modId ) || modScreenErrors .containsKey (modId );
536532
537- if (isMinecraft ) {
538- this . websiteButton . setMessage ( SEND_FEEDBACK_TEXT );
539- this .issuesButton . setMessage ( REPORT_BUGS_TEXT );
533+ if (modScreenErrors . containsKey ( modId ) ) {
534+ Throwable e = modScreenErrors . get ( modId );
535+ this .configureButton . setTooltip ( Tooltip . of ( ModMenuScreenTexts . configureError ( modId , e )) );
540536 } else {
541- this .websiteButton .setMessage (ModMenuScreenTexts .WEBSITE );
542- this .issuesButton .setMessage (ModMenuScreenTexts .ISSUES );
537+ this .configureButton .setTooltip (Tooltip .of (ModMenuScreenTexts .CONFIGURE ));
543538 }
539+ }
544540
545- this .websiteButton .visible = true ;
546- this .websiteButton .active = isMinecraft || selected .getMod ().getWebsite () != null ;
541+ boolean isMinecraft = modId .equals ("minecraft" );
542+ this .websiteButton .setMessage (isMinecraft ? SEND_FEEDBACK_TEXT : ModMenuScreenTexts .WEBSITE );
543+ this .issuesButton .setMessage (isMinecraft ? REPORT_BUGS_TEXT : ModMenuScreenTexts .ISSUES );
547544
548- this .issuesButton .visible = true ;
549- this .issuesButton .active = isMinecraft || selected .getMod ().getIssueTracker () != null ;
550- }
545+ this .websiteButton .visible = true ;
546+ this .websiteButton .active = isMinecraft || selected .getMod ().getWebsite () != null ;
547+
548+ this .issuesButton .visible = true ;
549+ this .issuesButton .active = isMinecraft || selected .getMod ().getIssueTracker () != null ;
551550 }
552551
553552 public double getScrollPercent () {
0 commit comments