problem render custom java model

Published by akamashi on Mon, 04/27/2020 - 15:20
Status
Resolved
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

hi ! I'm new ^^

so this is my problem :

i would like to create a living entity for my mod, i used blockbench to create my custom java model.

i import correctly my custom java model and my custom texture, but when i run the client, my custom mob don't appear correctly in game...

so i tried to import a basic model (iron golem) to test if the problem came from my own custom model. but the problem is still there; the models in game don't appear correctly.

 

so, i searched the reason on many forums but i still don't know why.

some persons said that the model must be reversed, but finally i don't understand anything anymore :c

 

i'm very lost... so i hope someone will can help me to fix it T^T

(sorry for my english)

Attachment Size
this is how the iron golem appear in blockbench188.94 KB 188.94 KB
and this is how it appear in game... 113.36 KB 113.36 KB

Issue comments

Models are just copied into MCreator, we do not change model code at all.

So if this is happening, it is something with modeler or your model setup. I suggest asking on the appropriate forums for your given modeler.

One thing I can think of is you might be using an outdated modeler version?

so, I will ask on blockbench forum too. 

But what kind of modeler do you recommend me, to create my own models for mcreator ? what is the best modeler for Mcreator ?

just one thing :') 

this is the code of the iron golem model. so, do you see somethings weird ? some errors which can explain the problem in game ?

 

//Made with Blockbench

package net.minecraft.src;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;

public class irongolem extends ModelBase {
    ModelRenderer body_0;
    ModelRenderer body_1;
    ModelRenderer head_2;
    ModelRenderer head_3;
    ModelRenderer arm0_4;
    ModelRenderer arm1_5;
    ModelRenderer leg0_6;
    ModelRenderer leg1_7;

      public irongolem() {
        this.textureWidth = 128;
        this.textureHeight = 128;

        this.body_0 = new ModelRenderer(this, 11, 51);
        this.body_0.addBox(-9F, 21F, -6F, 18, 12, 11, 1.0F);
        this.body_0.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(body_0, 0F, 0F, 0F);
        this.body_1 = new ModelRenderer(this, 6, 76);
        this.body_1.addBox(-4.5F, 16F, -3F, 9, 5, 6, 1.0F);
        this.body_1.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(body_1, 0F, 0F, 0F);
        this.head_2 = new ModelRenderer(this, 8, 8);
        this.head_2.addBox(-4F, 33F, -7.5F, 8, 10, 8, 1.0F);
        this.head_2.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(head_2, 0F, 0F, 0F);
        this.head_3 = new ModelRenderer(this, 26, 2);
        this.head_3.addBox(-1F, 32F, -9.5F, 2, 4, 2, 1.0F);
        this.head_3.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(head_3, 0F, 0F, 0F);
        this.arm0_4 = new ModelRenderer(this, 66, 27);
        this.arm0_4.addBox(9F, 3.5F, -3F, 4, 30, 6, 1.0F);
        this.arm0_4.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(arm0_4, 0F, 0F, 0F);
        this.arm1_5 = new ModelRenderer(this, 66, 64);
        this.arm1_5.addBox(-13F, 3.5F, -3F, 4, 30, 6, 1.0F);
        this.arm1_5.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(arm1_5, 0F, 0F, 0F);
        this.leg0_6 = new ModelRenderer(this, 42, 5);
        this.leg0_6.addBox(1.5F, 0F, -3F, 6, 16, 5, 1.0F);
        this.leg0_6.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(leg0_6, 0F, 0F, 0F);
        this.leg1_7 = new ModelRenderer(this, 71, 5);
        this.leg1_7.addBox(-7.5F, 0F, -3F, 6, 16, 5, 1.0F);
        this.leg1_7.setRotationPoint(0F, 0F, 0F);
        this.setRotateAngle(leg1_7, 0F, 0F, 0F);

    }

    @Override
    public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
        this.body_0.render(f5);
        this.body_1.render(f5);
        this.head_2.render(f5);
        this.head_3.render(f5);
        this.arm0_4.render(f5);
        this.arm1_5.render(f5);
        this.leg0_6.render(f5);
        this.leg1_7.render(f5);

    }

    public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
        modelRenderer.rotateAngleX = x;
        modelRenderer.rotateAngleY = y;
        modelRenderer.rotateAngleZ = z;
    }
}

so, i see... 

thanks for your help ^^ i will come back to you if i have other questions :)

i will check the link

infact the problem came from the exporter plugin of blockbench: I used to select "JAVA model" because the exporter plugin "JAVA entity" didn't works (invalid java name, but my name was correct). but thanks the link you gave me, I understood that the problem of this plugin was in the code (we have to remove the 1st, 2sd and 3th lines of the code make by blockbench).

 

so, now i use the corrcect exporter plugin (JAVA entity) and i know how to use it. 

use the plugin "JAVA model" wasn't the things to do... 

 

Thanks for your great help ! And keep going, your sofware are just amazing ! thanks Mcreator ;)

 

(sorry for my english T^T)



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.