Topic category: Help with MCreator software
(This may be a bug with the current snapshot, have not checked yet for the releases.)
This is something that's been annoying me, that of the model I keep exporting never being imported due to "MCreator detected the model you are importing is not compatible with the current generator", despite the model I'm importing being a 1.17-1.18 "Mojmap" along with the version my workspace is supposed to be being 1.17.
Also, this is the code.
// Made with Blockbench 4.2.0
// Exported for Minecraft version 1.17 with Mojang mappings
// Paste this class into your mod and generate all required imports
public class custom_model<T extends Entity> extends EntityModel<T> {
// This layer location should be baked with EntityRendererProvider.Context in the entity renderer and passed into this model's constructor
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", "custom_model"), "main");
private final ModelPart head;
private final ModelPart body;
private final ModelPart rightLeg;
private final ModelPart leftLeg;
private final ModelPart arms;
public custom_model(ModelPart root) {
this.head = root.getChild("head");
this.body = root.getChild("body");
this.rightLeg = root.getChild("rightLeg");
this.leftLeg = root.getChild("leftLeg");
this.arms = root.getChild("arms");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition head = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(22, 11).addBox(-3.0F, -2.8825F, -4.6135F, 6.0F, 5.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 13.0F, -5.0F));
PartDefinition body = partdefinition.addOrReplaceChild("body", CubeListBuilder.create().texOffs(0, 0).addBox(-3.0F, -1.0F, -4.0F, 6.0F, 10.0F, 7.0F, new CubeDeformation(0.0F))
.texOffs(25, 22).addBox(-2.5F, -1.0F, -1.5F, 5.0F, 8.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(0, 17).addBox(-4.0F, -2.5F, -2.5F, 8.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 16.0F, -4.0F, 0.7418F, 0.0F, 0.0F));
PartDefinition tail1 = body.addOrReplaceChild("tail1", CubeListBuilder.create().texOffs(0, 34).addBox(-1.0F, -1.0F, -1.0F, 2.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 4.0F, 1.0F, 0.1745F, 0.0F, 0.0F));
PartDefinition tail2 = tail1.addOrReplaceChild("tail2", CubeListBuilder.create().texOffs(32, 0).addBox(-1.0F, -0.5F, -1.1F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 2.0F, 0.0F, 0.3054F, 0.0F, 0.0F));
PartDefinition tail3 = tail2.addOrReplaceChild("tail3", CubeListBuilder.create().texOffs(14, 31).addBox(-1.0F, 0.0F, -1.2F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 3.0F, 0.0F, 0.2705F, 0.0F, 0.0F));
PartDefinition tail4 = tail3.addOrReplaceChild("tail4", CubeListBuilder.create().texOffs(6, 29).addBox(-1.0F, 0.0F, -1.18F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 3.5F, 0.0F, 0.0873F, 0.0F, 0.0F));
PartDefinition tail5 = tail4.addOrReplaceChild("tail5", CubeListBuilder.create().texOffs(26, 5).addBox(-1.0F, 0.0F, -1.2F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 3.5F, 0.0F, -0.0436F, 0.0F, 0.0F));
PartDefinition tail8 = tail5.addOrReplaceChild("tail8", CubeListBuilder.create().texOffs(34, 6).addBox(-1.0F, -0.4038F, -1.1872F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 4.0F, 0.0F, -0.1309F, 0.0F, 0.0F));
PartDefinition claw1 = tail8.addOrReplaceChild("claw1", CubeListBuilder.create().texOffs(0, 25).mirror().addBox(1.0F, -2.0038F, -0.0872F, 3.0F, 9.0F, 0.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(-1.0F, 1.0F, 0.0F));
PartDefinition claw2 = tail8.addOrReplaceChild("claw2", CubeListBuilder.create().texOffs(0, 25).addBox(-3.0F, -2.0038F, -0.0872F, 3.0F, 9.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 1.0F, 0.0F));
PartDefinition rightLeg = partdefinition.addOrReplaceChild("rightLeg", CubeListBuilder.create().texOffs(19, 0).addBox(-3.5F, 0.0F, -1.0F, 2.0F, 5.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(1.0F, 19.0F, 0.0F));
PartDefinition leftLeg = partdefinition.addOrReplaceChild("leftLeg", CubeListBuilder.create().texOffs(19, 0).mirror().addBox(1.5F, 0.0F, -1.0F, 2.0F, 5.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(-1.0F, 19.0F, 0.0F));
PartDefinition arms = partdefinition.addOrReplaceChild("arms", CubeListBuilder.create().texOffs(16, 25).addBox(-2.5F, -1.0F, -1.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(6, 25).addBox(-2.5F, 3.0F, -1.0F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F))
.texOffs(6, 25).mirror().addBox(0.5F, 3.0F, -1.0F, 2.0F, 1.0F, 3.0F, new CubeDeformation(0.0F)).mirror(false)
.texOffs(0, 0).mirror().addBox(0.5F, -1.0F, -1.0F, 2.0F, 4.0F, 2.0F, new CubeDeformation(0.0F)).mirror(false), PartPose.offset(0.0F, 17.0F, -4.0F));
return LayerDefinition.create(meshdefinition, 64, 64);
}
@Override
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
}
@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
head.render(poseStack, buffer, packedLight, packedOverlay);
body.render(poseStack, buffer, packedLight, packedOverlay);
rightLeg.render(poseStack, buffer, packedLight, packedOverlay);
leftLeg.render(poseStack, buffer, packedLight, packedOverlay);
arms.render(poseStack, buffer, packedLight, packedOverlay);
}
}
UPDATE: Remade the model, replicating every size I could for it, and yet it still refuses to work. This snapshot may have a critical issue.
Mcreator doesn't use mojang mappings, it only uses the MCP mappings.
This might've been the root of the problem if it actually wasn't the case in the end, as I did manage to use said Mojmaps models eventually, it was just the workspace being a bit janky. In addition to this, Blockbench has no support for 1.17-1.18 MCP models.
I am having the same problem witch means we only have 3 solutions:
1. Wait for an mcreator update that supports 1.17-1.18 Mojmaps
2. Wait for a Blockbench update with 1.17-1.18 MCP Models
3. Wait for someone else on this forum to come up with a better solution
Now that I realize it, all of those involve waiting...
I think there is a way to change mappings to mojang, but I don't know how exactly and it might cause some problems. I think you have to change something in your .toml file or build.gradle.
The latest version, 2022.1 is able to receive mojmaps files