Jump to content

How to Register Custom Entity Model mc 1.17.1


DinoPawz

Recommended Posts

RenderFile:

public class RenderLegendaryMalzahar<T extends Mob, M extends HumanoidModel<T>> extends MobRenderer<T, M> {

private static final ResourceLocation TEXTURE = new ResourceLocation(AncientFruitTrees.MODID, "textures/model/legendary/malzahar_a.png"); public

RenderLegendaryMalzahar(EntityRendererProvider.Context p_174169_, M p_174170_, float p_174171_) { this(p_174169_, p_174170_, p_174171_, 1.0F, 1.0F, 1.0F); }

 

public RenderLegendaryMalzahar(EntityRendererProvider.Context p_174173_, M p_174174_, float p_174175_, float p_174176_, float p_174177_, float p_174178_) {

super(p_174173_, p_174174_, p_174175_);

this.addLayer(new CustomHeadLayer(this, p_174173_.getModelSet(), p_174176_, p_174177_, p_174178_));

this.addLayer(new ElytraLayer(this, p_174173_.getModelSet()));

this.addLayer(new ItemInHandLayer(this)); }

 

@Nonnull public ResourceLocation getTextureLocation(@Nonnull T p_114891_) { return TEXTURE; }

 

This part doesn't work, cos RenderFactory does not seem to exist and neither does RenderingRegistry, and the model class above does not provide an constructor with no params.

public class ModRenderRegistry { public static void registryEntityRenderers() { RegistryObject.of(LegendaryMalzahar.class, new RenderLegendaryMalzahar()); RegistryObject.of(WowLichKing.class, new RenderWowLichKing()); } }

Edited by DinoPawz
restore spacing
Link to comment
Share on other sites

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.