public class ModelRene extends Entity> extends EntityModel<T> {
This is an invalid Java code. You have been editing code by hand but it seems you don't know Java so you really should learn Java first before doing manual changes
// Made with Blockbench 4.9.2 // Exported for Minecraft version 1.17 or later with Mojang mappings // Paste this class into your mod and generate all required imports
public class pig - Converted<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", "pig_- converted"), "main"); private final ModelPart body; private final ModelPart head; private final ModelPart leg1; private final ModelPart leg2; private final ModelPart leg3; private final ModelPart leg4;
This is an invalid Java code. You have been editing code by hand but it seems you don't know Java so you really should learn Java first before doing manual changes
okay BUT. it didint work because the name was invalid for java name model thingys so i edited it how do i fix this properly:
// Made with Blockbench 4.9.2
// Exported for Minecraft version 1.17 or later with Mojang mappings
// Paste this class into your mod and generate all required imports
public class pig - Converted<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", "pig_- converted"), "main");
private final ModelPart body;
private final ModelPart head;
private final ModelPart leg1;
private final ModelPart leg2;
private final ModelPart leg3;
private final ModelPart leg4;
public pig - Converted(ModelPart root) {
this.body = root.getChild("body");
this.head = root.getChild("head");
this.leg1 = root.getChild("leg1");
this.leg2 = root.getChild("leg2");
this.leg3 = root.getChild("leg3");
this.leg4 = root.getChild("leg4");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition body = partdefinition.addOrReplaceChild("body", CubeListBuilder.create().texOffs(28, 8).addBox(-5.0F, -9.0F, -7.0F, 10.0F, 16.0F, 8.0F, new CubeDeformation(0.0F))
.texOffs(34, 14).addBox(-2.0F, 6.0F, -4.0F, 4.0F, 3.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 11.0F, 2.0F, 1.5708F, 0.0F, 0.0F));
PartDefinition head = partdefinition.addOrReplaceChild("head", CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, -7.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-4.0F, -6.0F, -7.0F, 8.0F, 2.0F, 8.0F, new CubeDeformation(0.0F))
.texOffs(16, 16).addBox(-2.0F, 2.0F, -8.0F, 4.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(16, 16).addBox(3.0F, -1.0F, -8.0F, 1.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(16, 16).addBox(-4.0F, -1.0F, -8.0F, 1.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(16, 16).addBox(2.0F, 1.0F, -8.0F, 1.0F, 1.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(16, 16).addBox(-3.0F, 1.0F, -8.0F, 1.0F, 1.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 12.0F, -6.0F));
PartDefinition leg1 = partdefinition.addOrReplaceChild("leg1", CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -9.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(0, 16).addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(-3.0F, 18.0F, 7.0F));
PartDefinition leg2 = partdefinition.addOrReplaceChild("leg2", CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(0, 16).addBox(-2.0F, 0.0F, -9.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(3.0F, 18.0F, 7.0F));
PartDefinition leg3 = partdefinition.addOrReplaceChild("leg3", CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(-3.0F, 18.0F, -5.0F));
PartDefinition leg4 = partdefinition.addOrReplaceChild("leg4", CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offset(3.0F, 18.0F, -5.0F));
return LayerDefinition.create(meshdefinition, 64, 32);
}
@Override
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) {
}
@Override
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {
body.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
head.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
leg1.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
leg2.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
leg3.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
leg4.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}
}
Set the correct name in the modeller you use and not manually.
I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
I would start with https://www.youtube.com/watch?v=g0MuAEV7zIA
NVM fixed i asked chatgpt
I had to add a >T in the first one i edited
Example: PigEntityModel<T