Topic category: Help with Minecraft modding (Java Edition)
I tried to import a java model, and for some reason MCreator 2020.2 didn't accept it. The message that would follow would say that the name couldn't contain whitespace, start with a number, or include non-ASCII letters. I need help to fix this. Does anyone know what's wrong with the code?
Here's the code, by the way:
// Made with Blockbench 3.5.4
// Exported for Minecraft version 1.12
// Paste this class into your mod and generate all required imports
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 ModelElderElfBoss3 extends ModelBase {
private final ModelRenderer body;
private final ModelRenderer legright;
private final ModelRenderer legleft;
private final ModelRenderer armright;
private final ModelRenderer cane;
private final ModelRenderer bone6;
private final ModelRenderer bone7;
private final ModelRenderer armleft;
private final ModelRenderer head;
private final ModelRenderer earright;
private final ModelRenderer earleft;
private final ModelRenderer nose;
private final ModelRenderer bone3;
private final ModelRenderer bone4;
private final ModelRenderer bone5;
private final ModelRenderer ringbase;
private final ModelRenderer ring1;
private final ModelRenderer ring2;
private final ModelRenderer ring3;
private final ModelRenderer ring4;
private final ModelRenderer ringline1;
private final ModelRenderer ringline2;
private final ModelRenderer ringline3;
private final ModelRenderer ringline4;
public ModelElderElfBoss3() {
textureWidth = 64;
textureHeight = 64;
body = new ModelRenderer(this);
body.setRotationPoint(0.0F, 24.0F, 0.0F);
body.cubeList.add(new ModelBox(body, 0, 0, -4.0F, -22.0F, -2.0F, 8, 12, 4, 0.0F, false));
legright = new ModelRenderer(this);
legright.setRotationPoint(-2.0F, 14.0F, 0.0F);
setRotationAngle(legright, 0.2618F, 0.0F, 0.0F);
legright.cubeList.add(new ModelBox(legright, 40, 0, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, false));
legright.cubeList.add(new ModelBox(legright, 20, 12, -1.0F, 8.0F, -3.0F, 2, 2, 4, 0.0F, false));
legleft = new ModelRenderer(this);
legleft.setRotationPoint(2.0F, 14.0F, 0.0F);
setRotationAngle(legleft, 0.2618F, 0.0F, 0.0F);
legleft.cubeList.add(new ModelBox(legleft, 32, 0, -1.0F, 0.0F, -1.0F, 2, 8, 2, 0.0F, false));
legleft.cubeList.add(new ModelBox(legleft, 48, 12, -1.0F, 8.0F, -3.0F, 2, 2, 4, 0.0F, false));
armright = new ModelRenderer(this);
armright.setRotationPoint(-4.0F, 3.0F, 0.0F);
setRotationAngle(armright, -0.6981F, 0.1745F, 0.4363F);
armright.cubeList.add(new ModelBox(armright, 24, 0, -2.0F, 0.0F, -1.0F, 2, 10, 2, 0.0F, false));
cane = new ModelRenderer(this);
cane.setRotationPoint(0.0F, 0.0F, 0.0F);
armright.addChild(cane);
cane.cubeList.add(new ModelBox(cane, 48, 12, -1.5F, 8.0F, -6.0F, 1, 1, 5, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 50, 12, -1.5F, 6.0F, -12.5F, 1, 1, 4, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 50, 12, -1.5F, 14.0F, -11.5F, 1, 1, 4, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 52, 12, -1.5F, 9.0F, -14.7F, 1, 4, 1, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 0, 19, -2.0F, 13.5F, -8.0F, 2, 2, 2, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 48, 12, -1.5F, 8.0F, 1.0F, 1, 1, 5, 0.0F, false));
cane.cubeList.add(new ModelBox(cane, 20, 12, -1.5F, 8.0F, 6.0F, 1, 1, 5, 0.0F, true));
bone6 = new ModelRenderer(this);
bone6.setRotationPoint(0.0F, 9.0F, -6.0F);
cane.addChild(bone6);
setRotationAngle(bone6, -0.6109F, 0.0F, 0.0F);
bone6.cubeList.add(new ModelBox(bone6, 48, 12, -1.5F, -1.0F, -4.0F, 1, 1, 4, 0.0F, true));
bone6.cubeList.add(new ModelBox(bone6, 48, 12, -1.5F, 7.0F, -5.0F, 1, 1, 4, 0.0F, true));
bone7 = new ModelRenderer(this);
bone7.setRotationPoint(0.0F, 6.0F, -12.0F);
armright.addChild(bone7);
setRotationAngle(bone7, 0.8727F, 0.0F, 0.0F);
bone7.cubeList.add(new ModelBox(bone7, 48, 12, -1.5F, -0.2F, -4.0F, 1, 1, 4, 0.0F, true));
armleft = new ModelRenderer(this);
armleft.setRotationPoint(4.0F, 3.0F, 0.0F);
setRotationAngle(armleft, -0.5236F, -0.1745F, -0.4363F);
armleft.cubeList.add(new ModelBox(armleft, 48, 0, 0.0F, 0.0F, -1.0F, 2, 10, 2, 0.0F, false));
head = new ModelRenderer(this);
head.setRotationPoint(0.0F, 2.0F, 0.0F);
head.cubeList.add(new ModelBox(head, 24, 10, -4.0F, -8.0F, -4.0F, 8, 8, 8, 0.0F, false));
head.cubeList.add(new ModelBox(head, 0, 26, -5.0F, -10.0F, -5.0F, 10, 2, 10, 0.0F, false));
head.cubeList.add(new ModelBox(head, 16, 38, -3.0F, -3.0F, -4.1F, 6, 8, 1, 0.0F, false));
earright = new ModelRenderer(this);
earright.setRotationPoint(0.0F, 22.0F, 0.0F);
head.addChild(earright);
setRotationAngle(earright, 0.0F, 0.1745F, 0.0F);
earright.cubeList.add(new ModelBox(earright, 16, 18, -7.0F, -27.0F, -1.0F, 3, 3, 1, 0.0F, false));
earleft = new ModelRenderer(this);
earleft.setRotationPoint(0.0F, 22.0F, 0.0F);
head.addChild(earleft);
setRotationAngle(earleft, 0.0F, -0.1745F, 0.0F);
earleft.cubeList.add(new ModelBox(earleft, 8, 16, 4.0F, -27.0F, 0.0F, 3, 3, 1, 0.0F, false));
nose = new ModelRenderer(this);
nose.setRotationPoint(0.0F, 0.0F, 0.0F);
head.addChild(nose);
setRotationAngle(nose, 0.4363F, 0.0F, 0.0F);
nose.cubeList.add(new ModelBox(nose, 0, 16, -1.0F, -5.5F, -4.0F, 2, 1, 2, 0.0F, false));
bone3 = new ModelRenderer(this);
bone3.setRotationPoint(0.0F, 0.0F, 1.0F);
head.addChild(bone3);
setRotationAngle(bone3, -0.4363F, 0.0F, 0.0F);
bone3.cubeList.add(new ModelBox(bone3, 34, 32, -3.0F, -12.0F, -8.0F, 6, 5, 6, 0.0F, false));
bone4 = new ModelRenderer(this);
bone4.setRotationPoint(0.0F, 0.0F, 1.0F);
bone3.addChild(bone4);
setRotationAngle(bone4, -0.2618F, 0.0F, 0.0F);
bone4.cubeList.add(new ModelBox(bone4, 0, 38, -2.0F, -14.0F, -11.0F, 4, 5, 4, 0.0F, false));
bone5 = new ModelRenderer(this);
bone5.setRotationPoint(0.0F, 0.0F, 0.0F);
bone4.addChild(bone5);
setRotationAngle(bone5, -0.0873F, 0.0F, 0.0F);
bone5.cubeList.add(new ModelBox(bone5, 0, 19, -1.0F, -15.0F, -11.0F, 2, 2, 2, 0.0F, false));
ringbase = new ModelRenderer(this);
ringbase.setRotationPoint(0.0F, 2.0F, 9.25F);
ring1 = new ModelRenderer(this);
ring1.setRotationPoint(0.0F, 0.0F, 0.0F);
ringbase.addChild(ring1);
ring1.cubeList.add(new ModelBox(ring1, 0, 23, -2.5F, -16.0F, -0.25F, 5, 5, 0, 0.0F, false));
ring1.cubeList.add(new ModelBox(ring1, 0, 47, -3.5F, -2.5F, 0.0F, 7, 5, 0, 0.0F, false));
ring2 = new ModelRenderer(this);
ring2.setRotationPoint(0.0F, 0.0F, 0.0F);
ringbase.addChild(ring2);
setRotationAngle(ring2, 0.0F, 0.0F, 1.5708F);
ring2.cubeList.add(new ModelBox(ring2, 0, 28, -2.5F, -16.0F, -0.25F, 5, 5, 0, 0.0F, false));
ring3 = new ModelRenderer(this);
ring3.setRotationPoint(0.0F, 0.0F, 0.0F);
ringbase.addChild(ring3);
setRotationAngle(ring3, 0.0F, 0.0F, -3.1416F);
ring3.cubeList.add(new ModelBox(ring3, 0, 23, -2.5F, -16.0F, -0.25F, 5, 5, 0, 0.0F, false));
ring4 = new ModelRenderer(this);
ring4.setRotationPoint(0.0F, 0.0F, 0.0F);
ringbase.addChild(ring4);
setRotationAngle(ring4, 0.0F, 0.0F, -1.5708F);
ring4.cubeList.add(new ModelBox(ring4, 0, 28, -2.5F, -16.0F, -0.25F, 5, 5, 0, 0.0F, false));
ringline1 = new ModelRenderer(this);
ringline1.setRotationPoint(-0.5F, 0.0F, -0.25F);
ringbase.addChild(ringline1);
setRotationAngle(ringline1, 0.0F, 0.0F, 0.7854F);
ringline1.cubeList.add(new ModelBox(ringline1, 0, 47, -4.0F, -16.0F, 0.0F, 7, 5, 0, 0.0F, false));
ringline2 = new ModelRenderer(this);
ringline2.setRotationPoint(-0.5F, 0.0F, -0.25F);
ringbase.addChild(ringline2);
setRotationAngle(ringline2, 0.0F, 0.0F, 2.3562F);
ringline2.cubeList.add(new ModelBox(ringline2, 0, 47, -4.0F, -16.0F, 0.0F, 7, 5, 0, 0.0F, false));
ringline3 = new ModelRenderer(this);
ringline3.setRotationPoint(-0.5F, 0.0F, -0.25F);
ringbase.addChild(ringline3);
setRotationAngle(ringline3, 0.0F, 0.0F, -2.3562F);
ringline3.cubeList.add(new ModelBox(ringline3, 0, 47, -4.0F, -16.0F, 0.0F, 7, 5, 0, 0.0F, false));
ringline4 = new ModelRenderer(this);
ringline4.setRotationPoint(-0.5F, 0.0F, -0.25F);
ringbase.addChild(ringline4);
setRotationAngle(ringline4, 0.0F, 0.0F, -0.7854F);
ringline4.cubeList.add(new ModelBox(ringline4, 0, 47, -4.0F, -16.0F, 0.0F, 7, 5, 0, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
body.render(f5);
legright.render(f5);
legleft.render(f5);
armright.render(f5);
armleft.render(f5);
head.render(f5);
ringbase.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
Help would be appreciated! =)
Bug in 2020.2, update to 2020.3.
Before we start 1.12.2 convo, check: https://mcreator.net/forum/62695/generator-minecraft-1122-versions-20203
Also, please, please, start using search, there are way too many duplicates on this website due to ignorance.
Okay, sorry! =)