Topic category: Help with Minecraft modding (Java Edition)
There was A LOT of error like this, but no one could help me :<
Here's my code:
public class :)<T extends Entity> extends EntityModel<T> {
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(new ResourceLocation("modid", ":)"), "main");
private final ModelPart bone;
public :)(ModelPart root) {
this.bone = root.getChild("bone");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(0, 32).addBox(-9.0F, -10.0F, 4.0F, 4.0F, 10.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(16, 39).addBox(-9.0F, -10.0F, 8.0F, 4.0F, 10.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(-9.0F, -22.0F, 4.0F, 4.0F, 12.0F, 8.0F, new CubeDeformation(0.0F))
.texOffs(24, 7).addBox(-9.0F, -22.0F, 12.0F, 4.0F, 12.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(24, 23).addBox(-9.0F, -22.0F, 0.0F, 4.0F, 12.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(0, 20).addBox(-10.0F, -28.0F, 5.0F, 6.0F, 6.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(24, 0).addBox(-10.0F, -28.0F, 5.0F, 7.0F, 1.0F, 6.0F, new CubeDeformation(0.0F))
.texOffs(32, 39).addBox(-5.0F, -30.0F, 5.0F, 1.0F, 2.0F, 6.0F, new CubeDeformation(0.0F)), PartPose.offset(8.0F, 24.0F, -8.0F));
return LayerDefinition.create(meshdefinition, 64, 64);
}
@Override
public void setupAnim(Entity 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) {
bone.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
}
}
Help me plss