Jump to content

[1.17.1]How to add entity models in 1.17?


QWERTY 52 38

Recommended Posts

I am trying to updating my code in 1.16 to 1.17, but I have some problems.

public class SmallMcbbsWikiMonsterModel extends EntityModel<SmallMcbbsWikiMonsterEntity> {
    private final ModelPart body;

    public SmallMcbbsWikiMonsterModel() {
        textureWidth = 64;
        textureHeight = 64;

        body = new ModelRenderer(this, 0, 0);
        body.addBox(-16.0F, -8.0F, 0.0F, 16.0F, 8.0F, 16.0F);
    }

    @Override
    @ParametersAreNonnullByDefault
    public void setupAnim(SmallMcbbsWikiMonsterEntity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {

    }

    @Override
    @ParametersAreNonnullByDefault
    public void renderToBuffer(PoseStack matrixStackIn, VertexConsumer bufferIn, int packedLightIn, int packedOverlayIn, float red, float green, float blue, float alpha) {
        body.render(matrixStackIn, bufferIn, packedLightIn, packedOverlayIn);
    }
}

These four things: textureWidth, textureHeight, ModelRenderer and ModelPart.addBox does not exist in 1.17. What are their names now?

The model is just a single cuboid, with nothing else.

Please help me to update my code. Thanks.

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.



×
×
  • Create New...

Important Information

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