Jump to content

[1.17.1] How to use existing vanilla mob renderers for my custom mob?


Recommended Posts

Posted

I've created a custom entity named VillagerUnit which I want to look exactly like a base villager but with my own custom AI.

I was following this guide here for how to make said custom entity but he uses BlockBench to make a custom model renderer class instead of a vanilla model:

https://www.youtube.com/watch?v=iMJ1kWNWQBQ

When I try to apply the same registerRenderers code he does at 37:40 but instead on the existing vanilla renderer VillagerRenderer I get this error:

XuB7Sjt.png

 

I assume I don't need to register the layer since that had no reference the example entity made in the video (and I assume vanilla registers the layer itself for use by the actual villager mob)

Posted
11 minutes ago, Luis_ST said:

if you want to use the vanilla VillagerRenderer your custom Villager must extends the vanilla Villager

Is there a way to write a new renderer class that extends VillagerRenderer such that I can use it for my new class?

At the very least, what would be a way to reuse the same model?

Posted
38 minutes ago, SoLegendary said:

Is there a way to write a new renderer class that extends VillagerRenderer such that I can use it for my new class?

no the VillagerRenderer works only for extensions of Villager

 

40 minutes ago, SoLegendary said:

At the very least, what would be a way to reuse the same model?

no the model is only for the Villager, but you could extends the vanilla Villager Model and overwrite the setupAnim method.
then you could use it for your custom Entity

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.