Started by
Rikurob
on
Topic category: Advanced modding
This is a copy of my NPCEntityRenderer.java file for my upcoming mod Personas. This code renders the entity with the Player Model by extending HumanoidMobRenderer instead of something else, allowing the user to set the entity to use player skins.
Just replace the imports with your respective imports, NPCEntity with YourEntityNameEntity, the texture with the location of the skin texture you want to use, and plug this into your Entity Renderer.
Notes:
- Some of the imports are currently unused. I haven't working out crossbow charging as of yet but I am working on it, but I gave up for now and wanted to post this as is lol. I believe I have to edit the NPCEntity.java for that.
- Attacking with a bow must be set in your NPCEntity.java, not the renderer. This would only render the bow in the correct position.
- I'm sure there is stuff I left out of this, but this is the basics for how to make your entity look like the player
- Let me know if you have any questions.
Edited by Rikurob on Mon, 08/22/2022 - 14:31
You could add a skin randomizer to your entity, and set the value to your entity, and call that value as the skin texture as well if you wanted to randomize textures from a list of textures that you could set either in that file or in a config file.
Very nice
Thank you, get it working for you like this?
Yes it is possible! You have to add another layer. I am not exactly sure how to do it but the base to figure it out is there. It would work similar to the way the armor layer does, but you'd have to make a custom layer for it.
Is this still working?