Re-size / re-scale every mob you want

Started by GYPsycho on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Re-size / re-scale every mob you want

Hi... last few hour (like 10 in total) i tried to figure out how to resize mob.. 

1. tens of error

2. invisible model bug..

then i watched closely some tutorials and texts and here it is:

 

@Override
        public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue,
                float alpha) {
            matrixStack.push();
            matrixStack.translate(0f, 1.5f - 0.5 * 1.5f, 0f);
            matrixStack.scale(0.5f, 0.5f, 0.5f);
            main.render(matrixStack, buffer, packedLight, packedOverlay);
            matrixStack.pop();

}

 

just leave "main" to your body parts, mine was just "body" but you can have in your code something like:

 

@Override
        public void render(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue,
                float alpha) {
            matrixStack.push();
            matrixStack.translate(0f, 1.5f - 0.5 * 1.5f, 0f);
            matrixStack.scale(0.5f, 0.5f, 0.5f);

 "head.render(matrixStack, buffer, packedLight, packedOverlay"

"left_leg.render(matrixStack, buffer, packedLight, packedOverlay"

"right_leg.render(matrixStack, buffer, packedLight, packedOverlay"

"left_hand.render(matrixStack, buffer, packedLight, packedOverlay"

"right_hand.render(matrixStack, buffer, packedLight, packedOverlay".

            matrixStack.pop();

}

 

 And change numbers in "matrixStack.scale" to work with scale which you want

dont forget to check for " ; " and " { } " at right place