Jump to content

[1.16.1] Ways to get formatted string?


Recommended Posts

I'm porting my 1.15.2 mod to 1.16.1 . In 1.15.2 , ITextComponent#getFormattedText() is the way to achieve my goal, but in 1.16.1, since most of forge is still mapping, I did not find a similar method to achieve my goal. 
Any idea?


Also, is  ITextComponent#applyTextStyle() in 1.16.1 calls  ITextComponent#func_240699_a_()?

Link to comment
Share on other sites

um, to be clear, I want to draw it with font renderer but it only accepts String, that's the first problem, and second, after got all tooltips on the tool player is holding, they're formatted but ITextComponent, therefore, I might need that to achieve what I want in a simple way.

Note: How about copy 1.15.2's method code and try to modify to be compatible to 1.16.2's?


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.

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.


  • Create New...

Important Information

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