So you’re developing a beautiful screen, and you need to update it after an action (e.g. you clicked a button and an item should be added to a list). The screen infrastructure has some affordances for synchronizing slots and properties, but the latter are integer only and slots are for itemstacks and inventories only. What if you want to update some more complex data?
Turns out you have to do this with some networking magic, in order to send the update from the client to the server (when you click the button), and then an update from the server to the client again (after the server has updated). And that’s basically it. Easier said than done, so let’s see how we would approach this.
update 2025-02-09: forgot a section! Added the entity model registration.
Minecraft has this feature call “feature renderers” that allows you to add a model to an existing model. This is used for example to show capes, but there’s also one called Deadmau5FeatureRenderer that apparently adds Deadmau5 ears to the player if they are called “Deadmau5”. The things you find perusing the Yarn mappings. 😄
But anyway, using these feature renderers yourself is a little bit more work than you’d expect it to be since there doesn’t seem to be a way to register one of these renderers without resorting to mixins.
Hi there!
Welcome to my (new, depending on when you read this) blog!
This blog is made using Hugo, and I’m still exploring that so things might change a bit around here before they settle down. Or maybe not. 😄