Topic category: Help with Minecraft modding (Java Edition)
I want to create a lava monster but when trying to import the file that I took out of BlockBench in Mcreator, I get "Invalid Model Name" .... I don't know how to solve it and I didn't understand how to do it from the forums that already exist, I'm not an expert in anything of this and less in codes ...
Here is the code for my mob and maybe you know how to fix it.
Code:
// Made with Blockbench 3.5.2
// Exported for Minecraft version 1.12
// Paste this class into your mod and generate all required imports
public class custom_model extends ModelBase {
private final ModelRenderer PartesCuerpo;
private final ModelRenderer PartesCabeza;
private final ModelRenderer PartesCola;
public custom_model() {
textureWidth = 64;
textureHeight = 64;
PartesCuerpo = new ModelRenderer(this);
PartesCuerpo.setRotationPoint(0.0F, 24.0F, 0.0F);
PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 0, 0, -5.0F, -17.0F, -5.0F, 10, 8, 10, 0.0F, false));
PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 0, 42, -7.0F, -11.0F, 1.0F, 2, 4, 4, 0.0F, false));
PartesCuerpo.cubeList.add(new ModelBox(PartesCuerpo, 40, 19, 5.0F, -11.0F, 1.0F, 2, 4, 4, 0.0F, false));
PartesCabeza = new ModelRenderer(this);
PartesCabeza.setRotationPoint(0.0F, 24.0F, 0.0F);
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 18, -3.0F, -16.0F, -9.0F, 6, 6, 5, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 22, 22, -3.0F, -15.0F, -15.0F, 6, 1, 6, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 29, -3.0F, -11.0F, -14.0F, 6, 1, 5, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 35, 2.0F, -14.0F, -15.0F, 1, 1, 6, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 34, 12, -3.0F, -14.0F, -15.0F, 1, 1, 6, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 0, 0, -2.0F, -14.0F, -15.0F, 4, 1, 1, 0.0F, false));
PartesCabeza.cubeList.add(new ModelBox(PartesCabeza, 26, 29, -5.0F, -23.0F, -8.0F, 10, 7, 0, 0.0F, false));
PartesCola = new ModelRenderer(this);
PartesCola.setRotationPoint(0.0F, 24.0F, 0.0F);
PartesCola.cubeList.add(new ModelBox(PartesCola, 30, 0, -2.0F, -17.0F, 5.0F, 4, 3, 5, 0.0F, false));
PartesCola.cubeList.add(new ModelBox(PartesCola, 15, 29, -1.0F, -16.5F, 10.0F, 2, 2, 7, 0.0F, false));
PartesCola.cubeList.add(new ModelBox(PartesCola, 0, 2, -1.0F, -18.5F, 17.0F, 2, 4, 1, 0.0F, false));
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
PartesCuerpo.render(f5);
PartesCabeza.render(f5);
PartesCola.render(f5);
}
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
Update to 2020.3:
I have 2020.3 but it won't let me open my mod that I have in 1.12 so I keep using 2020.2
Then you will have to live with bugs. Check the ticket I linked for a workaround.
ah don't forget it xd, I already found a way to have everything from 1.12 in the latest version. thanks for the warning!!
Sorry for spelling mistakes, I'm from Argentina and my English is sooo bad :v
Delete the first 3 likes of code from the model. 2020.2 can't read the model if those lines are there. I also thought the best option was to update to a recent version with the 1.12.2 plugin, but it disables oreDictionary support because of the tags from newer Minecraft versions. If you mod doesn't use the oreDictionary, then you'll be fine in newer versions. If not, you'd have to code it yourself.