Text Component, mix of dynamic and static text #320
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ThreeTAG/Palladium#320
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and Suggestion
While dynamic text components exist; using Values in place of Minecraft's Text Component limits flexibility. What about combining static text with dynamic values using a format string with placeholders?
For example, a static string with placeholders that can be replaced by Values, simple code that could be represented in json:
"Hello, %s. You have obtained %s".replace(name_data_attachment, choice_string_data_attachment)Implementation
I was thinking this can be written within the class
TextComponentValueHolder:placeholdersmaybe? (Work out the name semantics later lmao)Finally, to expand usage beyond the ui widgets, it can replace the variable types in Power
name, and AbilityPropertiestitleReported by 🚨Spyeedy🚨 (@spyeedy) via Discord — open thread