public class extends ModelBase {
private final ModelRenderer head;
private final ModelRenderer body;
private final ModelRenderer leftarm;
private final ModelRenderer rightarm;
private final ModelRenderer leftleg;
private final ModelRenderer rightleg;
public () {
textureWidth = 64;
textureHeight = 64;
What do you mean by won't work? Any error messages?
Yes, It Says That It Cannot Contain Whitespace, Cannot Start With A Number, And Contain ASCII Letters. How Do I Solve This?
Search the error message you get on this website, there are tens of topics that have the solution for this.
link
You can search here: https://mcreator.net/search/content There is a search bar on the top of the website for a quick access too :)
i've tried that yesterday, but i can't find a solution.
Here is the code:
//Made with Blockbench
//Paste this code into your mod.
import org.lwjgl.opengl.GL11;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBox;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
public class extends ModelBase {
private final ModelRenderer head;
private final ModelRenderer body;
private final ModelRenderer leftarm;
private final ModelRenderer rightarm;
private final ModelRenderer leftleg;
private final ModelRenderer rightleg;
public () {
textureWidth = 64;
textureHeight = 64;
head = new ModelRenderer(this);
head.setRotationPoint(0.0F, 24.0F, 0.0F);
head.cubeList.add(new ModelBox(head, 0, 0, -4.0F, -10.0F, -2.0F, 8, 8, 8, 0.0F, false));
head.cubeList.add(new ModelBox(head, 0, 16, -4.0F, -5.0F, -3.0F, 8, 3, 1, 0.0F, false));
head.cubeList.add(new ModelBox(head, 16, 32, -4.0F, -6.0F, -3.0F, 1, 1, 1, 0.0F, false));
head.cubeList.add(new ModelBox(head, 12, 32, 3.0F, -6.0F, -3.0F, 1, 1, 1, 0.0F, false));
body = new ModelRenderer(this);
body.setRotationPoint(0.0F, 24.0F, 0.0F);
body.cubeList.add(new ModelBox(body, 6, 53, -3.0F, -11.0F, 1.0F, 6, 1, 2, 0.0F, false));
leftarm = new ModelRenderer(this);
leftarm.setRotationPoint(0.0F, 24.0F, 0.0F);
leftarm.cubeList.add(new ModelBox(leftarm, 0, 24, -5.0F, -7.0F, 1.0F, 1, 6, 2, 0.0F, false));
rightarm = new ModelRenderer(this);
rightarm.setRotationPoint(0.0F, 24.0F, 0.0F);
rightarm.cubeList.add(new ModelBox(rightarm, 18, 16, 4.0F, -7.0F, 1.0F, 1, 6, 2, 0.0F, false));
leftleg = new ModelRenderer(this);
leftleg.setRotationPoint(0.0F, 24.0F, 0.0F);
leftleg.cubeList.add(new ModelBox(leftleg, 6, 32, -4.0F, -1.0F, 0.0F, 2, 1, 1, 0.0F, false));
leftleg.cubeList.add(new ModelBox(leftleg, 6, 28, -4.0F, -2.0F, 1.0F, 2, 2, 2, 0.0F, false));
rightleg = new ModelRenderer(this);
rightleg.setRotationPoint(0.0F, 24.0F, 0.0F);
rightleg.cubeList.add(new ModelBox(rightleg, 0, 32, 2.0F, -1.0F, 0.0F, 2, 1, 1, 0.0F, false));
rightleg.cubeList.add(new ModelBox(rightleg, 6, 24, 2.0F, -2.0F, 1.0F, 2, 2, 2, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
head.render(f5);
body.render(f5);
leftarm.render(f5);
rightarm.render(f5);
leftleg.render(f5);
rightleg.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
You did not search as if you did you would know that this is not OK:
Your model is missing a model name and you are not the first one.
It should look like this for example:
same for the constructor of the model.
Set model name in the modeler before exporting the model and importing it in MCreator.
OMG THANKS
wait how do you make mobs spawn in caves
Set its type to Mob and spawning type to monster.
k thx