Skip to content

Commit

Permalink
update chair model
Browse files Browse the repository at this point in the history
  • Loading branch information
TropheusJ committed Jul 27, 2023
1 parent d0508dc commit 861cef0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@
public class ChairModel extends FizzleableModel<ChairEntity> {
public static final ModelLayerLocation CHAIR_LAYER = new ModelLayerLocation(id("chair"), "main");
@SuppressWarnings("checkstyle:MemberName")
private final ModelPart bb_main;
private final ModelPart bone;

public ChairModel(ModelPart root) {
this.bb_main = root.getChild("bb_main");
this.bone = root.getChild("bone");
}

public static LayerDefinition getTexturedModelData() {
MeshDefinition modelData = new MeshDefinition();
PartDefinition modelPartData = modelData.getRoot();
PartDefinition bone = modelPartData.addOrReplaceChild("bb_main", CubeListBuilder.create().texOffs(0, 0).addBox(-3.5F, -0.5F, -3.5F, 7.0F, 1.0F, 7.0F, new CubeDeformation(0.0F)), PartPose.offset(-0.068F, 17.0F, 0.0251F));
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();

bone.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(16, 8).addBox(-1.0F, -3.5F, 0.5F, 2.0F, 0.0F, 4.0F, new CubeDeformation(0.0F))
.texOffs(11, 17).addBox(-3.5F, -3.5F, 4.5F, 7.0F, 1.0F, 4.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 1.5708F, 0.0F, 0.0F));
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(0, 0).addBox(-3.5263F, -2.9444F, -4.1769F, 7.0F, 1.0F, 7.0F, new CubeDeformation(0.0F))
.texOffs(21, 0).addBox(-3.5263F, -10.9444F, 1.8231F, 7.0F, 4.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(21, 8).addBox(-1.0263F, -6.9444F, 2.8231F, 2.0F, 4.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offset(-0.0417F, 19.4444F, 0.6517F));

bone.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 9).addBox(-5.0F, -7.0F, 0.5F, 9.0F, 5.0F, 0.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(3.0F, -2.5F, 0.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.7751F, 7.5F, 0.068F, 0.0F, -0.7854F, 0.0F));
PartDefinition cube_r1 = bone.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -2.0F, -1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.7512F, 4.5556F, -0.7449F, 0.0F, -0.7854F, 0.0F));

bone.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(0, 9).addBox(-5.0F, -7.0F, -0.5F, 9.0F, 5.0F, 0.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(3.0F, -2.5F, -1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.7751F, 7.5F, 0.068F, 0.0F, 0.7854F, 0.0F));
PartDefinition cube_r2 = bone.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -2.0F, 0.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.7512F, 4.5556F, -0.7449F, 0.0F, 0.7854F, 0.0F));

bone.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -2.0F, -1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.7249F, 7.0F, 0.068F, 0.0F, -0.7854F, 0.0F));
PartDefinition cube_r3 = bone.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(0, 0).addBox(3.0F, -2.0F, -1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F))
.texOffs(0, 9).addBox(-5.0F, -6.5F, -0.5F, 9.0F, 6.0F, 0.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.7488F, 4.5556F, -0.7449F, 0.0F, 0.7854F, 0.0F));

bone.addOrReplaceChild("cube_r5", CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -2.0F, 0.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(-0.7249F, 7.0F, 0.068F, 0.0F, 0.7854F, 0.0F));
return LayerDefinition.create(modelData, 64, 64);
PartDefinition cube_r4 = bone.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(0, 9).addBox(-5.0F, -7.0F, 0.5F, 9.0F, 6.0F, 0.0F, new CubeDeformation(0.0F))
.texOffs(0, 0).addBox(3.0F, -2.5F, 0.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.7488F, 5.0556F, -0.7449F, 0.0F, -0.7854F, 0.0F));

return LayerDefinition.create(meshdefinition, 64, 64);
}

@Override
public void renderFizzled(PoseStack matrixStack, VertexConsumer buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha) {

bb_main.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
bone.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha);
}

}
Binary file modified src/main/resources/assets/portalcubed/textures/entity/chair.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 861cef0

Please sign in to comment.