Topic category: Help with Minecraft modding (Java Edition)
I've been attempting to figure out how to give an entity a Custom Skin/Function when Name Tagged (Like when a Sheep is named jeb_, or a Vindicator is named Johnny).
As well as potentially Player Usernames (Like the developers Dinnerbone and Grumm being upside down, or Notch having once dropped apples on death.)
For context! I'm using MCreator version 2023.4 as well as the "Nerdy's GeckoLib Plugin" for that same version. (Big thanks to user "friyes" for helping me figure out my version was only for forge.)
I've been making steady progress with my first mod, having made an animated creature as well as started work on a few crop ideas. And I was wondering- would it be possible with MCreator to give an entity a custom skin and/or functionality when given a specific name with a name tag?
(as many gamers are prone to do, I want to make an easter egg)
But then I also began to wonder if it would be possible to have custom functionality for players with specific usernames? Because I think it would be a nice thing to do for my friends who have been helping me while also making mods of their own.
My biggest issue though, is that I'm just not quite certain how one would go about doing either of those two things.
If within MCreator, it simply isn't possible to give players their own unique trait, then I'll concede that. But since mobs getting special skins when named tagged is an inherently base-game function of Minecraft, I would hope at least that would be something I could potentially accomplish.
And such is my question. How would I go about making the custom name tag easter-egg? Any help would be certainly, very much appreciated! I would love to be able to do both the player and mobs things, but would happily settle for just one! I'll of course continue to look into this myself, but I also send out this post in the hopes that someone more knowledgeable than I would be willing to provide their expertise!
-Thank you, and have a wonderful day!
The specific players getting stuff in your mod shouldn't be too difficult,
UUID is probably best since it makes sure your friends can change their name and still get the benefits.
---
But the making a new dinnerbone/jeb_ mob is probably going to require custom code,
you can look at how vanilla does the sheep in the
net.minecraft.client.renderer.entity.layers.SheepFurLayer
class.Hey! My savior once again! I appreciate you!
I'll give that a little test and see if it works for me! (though how soon I get to that is to be determined, lol.)
My new secondary question is... how would I go about looking into the "net.minecraft.client.renderer.entity.layers.SheepFurLayer class"?
I'm- to be polite to myself- not very knowledgeable about these things, and general code stuff can escape my understanding.
Just for clarification though- that does mean that the custom entity skin when named should be possible in MCreator, yeah? or am I misinterpreting what you said?
Yeah well it is possible in MCreator it just requires custom code. You can use the search bar here,
Just double click
SheepFurLayer.java
.You're incredible! Thank you! 🙏
Always happy to help! :)