Creators-of-Create / Create

[Forge Mod] Building Tools and Aesthetic Technology
MIT License
2.96k stars 912 forks source link

[FEATURE] Serverside way to get Display Link data #7180

Open sashafiesta opened 2 hours ago

sashafiesta commented 2 hours ago

Display Link data is a difficult thing because it's inconsistent depending on user locale. When developing addons with blocks relying on display link info, it's always hard to get uniform data (thats why I ended up using a mixin in my own project) It'd be nice to have some way to recieve non-localized Display Link data and probably to also recieve "pure" data without text that could be localized. Also different decimal separators is very inconvenient to work with.

Example: English: "256RPM" Pure: "256"

sashafiesta commented 2 hours ago

And its even trickier in a singleplayer game! Some locales have thousands separator too. So to extract data from strings(I actually needed to extract numbers from display link string, not as a workaround) I actually ended up with mixin'ing Minecraft to always load English language along with user-selected one to have somewhat-uniform'ish display link strings on the serverside.