Add support for multiline splash text#18
Add support for multiline splash text#18OffsetMonkey538 wants to merge 3 commits intoMoSadie:mainfrom
Conversation
|
Honestly not sure if in scope either but will look at this over the weekend! |
|
I think it probably is in scope? Or at least it'd be a bit stupid trying to make a srparate mod for this while having compat with this mod. I guess I'd have to fully overwrite the splashes added by anything (including themes) and just get the multiline ones from a separate source? Would be much better if somehow one could return multiline things from the smm theme. Maybe a custom SplashText record and builder could be an alternative for the text array? So one could return for example SplashText.builder()
.addLine(line1)
.addLine(line2);or SplashText.builder(line1)
.addLine(line2)depening on how they like their code formatted. This would also allow for not forcing people to manually create Text instances with the default yellow color by adding overloads for the builder and addLine methods like I may take a look at implementing this later today |
|
okay yes I think this is much better than having it return an array of Text A simple thing wanting to add a single line splash with no fancy formatting is much simpler than before with an array: - new Text[] { Text.literal("Very cool splash!").setStyle(Util.DEFAULT_WHATEVEr) }
+ SplashText.builder("Very cool splash!").build() |
|
A builder isn't a bad idea... I do have a thought: If you don't mind, I'd like to save this multi-line change until the next major update (happening soon:tm: with Minecraft 26.1 and the big SMM rebrand) since people will have to update their theme mods anyways! |
I'm not sure if this is something that's in scope for this project, but I needed it lol.
I'm not 100% sure if returning an array of texts is the best way to do this though as it creates a bit of boilerplate for just adding basic single line ones...
and with my other project I now need to use a 2d array for getting a random splash...
but I'm sure it's fineeeeeeee, this is Java, we love boilerplate!