Jump to content

AdvancementsScreen buttons not rendering


ArcadeToast

Recommended Posts

I think i found a rendering bug or something like that in the AdvancementsScreen class. As far as I know, Forge adds a few things so that the AdvancementsScreen also works with more than just the vanilla advancements and adds buttons to navigate in the tab pages. But the super method during the render method isn't called so the buttons won't be rendered, it isn't game-breaking but i thought it wouldn't harm to report it.

Code from AdvancementsScreen#render :

public void render(PoseStack p_97361_, int p_97362_, int p_97363_, float p_97364_) {
   int i = (this.width - 252) / 2;
   int j = (this.height - 140) / 2;
   this.renderBackground(p_97361_);
   //SUPER METHOD MUST BE CALLED HERE FOR BUTTOSN TO RENDER
   if (maxPages != 0) {
      net.minecraft.network.chat.Component page = new net.minecraft.network.chat.TextComponent(String.format("%d / %d", tabPage + 1, maxPages + 1));
      int width = this.font.width(page);
      this.font.drawShadow(p_97361_, page.getVisualOrderText(), i + (252 / 2) - (width / 2), j - 44, -1);
   }
   this.renderInside(p_97361_, p_97362_, p_97363_, i, j);
   this.renderWindow(p_97361_, i, j);
   this.renderTooltips(p_97361_, p_97362_, p_97363_, i, j);
}

 

Screenshot 1: vanilla AdvancementsScreen

Screenshot 2: Custom AdvancementsScreen with the super method called durin render

vanilla.png

custom.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.