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.
- 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.