[20w17a] Hooks for tweaking style
liach opened this issue ยท 4 comments
Now, in 20w17a, the style of a text receives an addition.
However, some properties of style cannot be set in code as the methods have been stripped by proguard or marked client-only.
Moreover, now styles are immutable, and there may be a desire for mutable styles.
Then, I propose a StyleBuilder
which is a mutable style and offers methods that have been removed by proguard, as shown in https://github.com/FabLabsMC/StyleBuilder . This issue is for feasibility discussion.
Are you talking about text in chat or text in general? Because my server mod sends feedback for command and uses some styling. I used the formatted
method on the LiteralText class but it seems to be gone with this snapshot. I did find methods called method_27692
and such, which do have the same signature. From what I gathered from the changelog of this snapshot, styling has been expanded (more colors at least) so I assumed there was gonna be a change here. But I'm not sure how to use these now.
Ignore my previous message, in the latest snapshot (20w18a) the formatted
methods are back. Looks like I have to do some refactoring because I use the deprecated CommandDispatcher though ๐
As of 1.16.3 the only client only method is the font. So this may still be relevant.