mob model error

Started by viatrophy997 on

Topic category: Help with modding (Java Edition)

Last seen on 16:16, 26. May 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
mob model error

so this is the error i keep getting. i cant even delete the mob model because it keeps coming back (dont know from)...


public class Modelram<T extends> extends EntityModel<> {
// 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("fantasia_ii_", "modelram"),
"main");
public final ModelPart body;
public final ModelPart head;
public final ModelPart leg0;
public final ModelPart leg1;
public final ModelPart leg2;
public final ModelPart leg3;
public Modelram(ModelPart root) {
this.body = root.getChild("body");
this.head = root.getChild("head");
this.leg0 = root.getChild("leg0");
this.leg1 = root.getChild("leg1");
this.leg2 = root.getChild("leg2");
this.leg3 = root.getChild("leg3");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition body = partdefinition.addOrReplaceChild("body",
CubeListBuilder.create().texOffs(22, 18)
.addBox(-4.0F, -11.0F, -7.0F, 8.0F, 16.0F, 6.0F, new CubeDeformation(0.0F)).texOffs(0, 0)
.addBox(-4.0F, -11.0F, -7.0F, 8.0F, 18.0F, 6.0F, new CubeDeformation(1.75F)),
PartPose.offsetAndRotation(0.0F, 5.0F, 2.0F, 1.5708F, 0.0F, 0.0F));
PartDefinition head = partdefinition.addOrReplaceChild("head",
CubeListBuilder.create().texOffs(28, 0)
.addBox(-3.0F, -4.0F, -7.0F, 6.0F, 6.0F, 8.0F, new CubeDeformation(0.0F)).texOffs(0, 34)
.addBox(-3.0F, -4.0F, -5.0F, 6.0F, 6.0F, 6.0F, new CubeDeformation(0.6F)).texOffs(8, 24)
.addBox(4.2F, -4.0F, -4.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.6F)).texOffs(0, 0)
.addBox(-5.2F, -4.0F, -4.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.6F)).texOffs(0, 24)
.addBox(6.4F, -3.0F, -6.0F, 1.0F, 1.0F, 3.0F, new CubeDeformation(0.6F)).texOffs(22, 0)
.addBox(-7.4F, -3.0F, -6.0F, 1.0F, 1.0F, 3.0F, new CubeDeformation(0.6F)).texOffs(26, 0)
.addBox(6.4F, -4.0F, -7.2F, 0.0F, 2.0F, 0.0F, new CubeDeformation(0.6F)).texOffs(26, 1)
.addBox(-6.4F, -4.0F, -7.2F, 0.0F, 2.0F, 0.0F, new CubeDeformation(0.6F)),
PartPose.offset(0.0F, 6.0F, -8.0F));
PartDefinition leg0 = partdefinition.addOrReplaceChild("leg0",
CubeListBuilder.create().texOffs(32, 55)
.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 3.0F, new CubeDeformation(0.0F)).texOffs(51, 50)
.addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 5.0F, new CubeDeformation(0.5F)),
PartPose.offset(-3.0F, 12.0F, 7.0F));
PartDefinition leg1 = partdefinition.addOrReplaceChild("leg1",
CubeListBuilder.create().texOffs(18, 51)
.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 3.0F, new CubeDeformation(0.0F)).texOffs(50, 29)
.addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 5.0F, new CubeDeformation(0.5F)),
PartPose.offset(3.0F, 12.0F, 7.0F));
PartDefinition leg2 = partdefinition.addOrReplaceChild("leg2",
CubeListBuilder.create().texOffs(50, 14)
.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 3.0F, new CubeDeformation(0.0F)).texOffs(0, 46)
.addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 5.0F, new CubeDeformation(0.5F)),
PartPose.offset(-3.0F, 12.0F, -5.0F));
PartDefinition leg3 = partdefinition.addOrReplaceChild("leg3",
CubeListBuilder.create().texOffs(42, 40)
.addBox(-2.0F, 0.0F, -2.0F, 4.0F, 12.0F, 3.0F, new CubeDeformation(0.0F)).texOffs(24, 40)
.addBox(-2.0F, 0.0F, -3.0F, 4.0F, 6.0F, 5.0F, new CubeDeformation(0.5F)),
PartPose.offset(3.0F, 12.0F, -5.0F));
return LayerDefinition.create(meshdefinition, 128, 128);
}
@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);
leg0.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);
}
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
float headPitch) {
this.head.yRot = netHeadYaw / (180F / (float) Math.PI);
this.head.xRot = headPitch / (180F / (float) Math.PI);
this.leg0.xRot = Mth.cos(limbSwing * 1.0F) * 1.0F * limbSwingAmount;
this.leg1.xRot = Mth.cos(limbSwing * 1.0F) * -1.0F * limbSwingAmount;
this.leg2.xRot = Mth.cos(limbSwing * 1.0F) * 1.0F * limbSwingAmount;
this.leg3.xRot = Mth.cos(limbSwing * 1.0F) * -1.0F * limbSwingAmount;
}
Last seen on 20:46, 11. May 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have the same problem!
Sat, 05/11/2024 - 12:41

I have the same problem!

public class Modelram<T…
Sat, 05/11/2024 - 13:46

public class Modelram<T extends> extends EntityModel<>

This is not something I would call Java code. It is simply broken.

What modeler did produce this code?

Last seen on 16:16, 26. May 2024
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is from blockbench
Sat, 05/11/2024 - 16:24

this is from blockbench