Skip to content

Commit

Permalink
完成旗帜系统微调
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed Jan 6, 2024
1 parent 7408f0e commit 9fd7dad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,22 @@ public MaidBannerModel(ModelPart root) {
public static LayerDefinition createBodyLayer() {
MeshDefinition meshdefinition = new MeshDefinition();
PartDefinition partdefinition = meshdefinition.getRoot();
PartDefinition main = partdefinition.addOrReplaceChild("main", CubeListBuilder.create().texOffs(34, 49).addBox(-1.0F, -68.0F, 10.0F, 2.0F, 2.0F, 13.0F, new CubeDeformation(0.05F))
.texOffs(34, 49).addBox(-1.0F, -68.0F, -3.0F, 2.0F, 2.0F, 13.0F, new CubeDeformation(0.05F))
.texOffs(56, 0).addBox(-1.0F, -35.0F, -1.0F, 2.0F, 35.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(56, 0).addBox(-1.0F, -70.0F, -1.0F, 2.0F, 35.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 24.0F, 0.0F));
PartDefinition banner = partdefinition.addOrReplaceChild("banner", CubeListBuilder.create().texOffs(0, 0).addBox(1.0F, -66.0F, -1.0F, 20.0F, 40.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 24.0F, 0.0F, 0.0F, -1.5708F, 0.0F));

PartDefinition main = partdefinition.addOrReplaceChild("main", CubeListBuilder.create().texOffs(34, 49).addBox(-1.0F, -68.0F, 10.0F, 2.0F, 2.0F, 13.0F, new CubeDeformation(0.1F))
.texOffs(34, 49).addBox(-1.0F, -68.0F, -3.0F, 2.0F, 2.0F, 13.0F, new CubeDeformation(0.1F))
.texOffs(56, 0).addBox(-1.0F, -35.0F, -1.0F, 2.0F, 35.0F, 2.0F, new CubeDeformation(0.05F))
.texOffs(56, 0).addBox(-1.0F, -70.0F, -1.0F, 2.0F, 35.0F, 2.0F, new CubeDeformation(0.05F)), PartPose.offset(0.0F, 24.0F, 0.0F));

PartDefinition bone = main.addOrReplaceChild("bone", CubeListBuilder.create().texOffs(56, 0).addBox(-1.0F, -26.0F, 1.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(56, 0).addBox(-1.0F, -46.0F, 1.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(56, 0).addBox(-1.0F, -36.0F, 1.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(56, 0).addBox(-1.0F, -56.0F, 1.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 0.0F));

PartDefinition bone2 = main.addOrReplaceChild("bone2", CubeListBuilder.create().texOffs(56, 0).addBox(-1.0F, -66.0F, 6.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F))
.texOffs(56, 0).addBox(-1.0F, -66.0F, 16.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)), PartPose.offset(0.0F, 0.0F, 0.0F));

PartDefinition banner = partdefinition.addOrReplaceChild("banner", CubeListBuilder.create().texOffs(0, 0).addBox(2.0F, -65.0F, -0.5F, 20.0F, 40.0F, 1.0F, new CubeDeformation(0.0F)), PartPose.offsetAndRotation(0.0F, 24.0F, 0.0F, 0.0F, -1.5708F, 0.0F));

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public void render(PoseStack matrixStack, MultiBufferSource bufferIn, int packed
if (geoModel != null && !geoModel.backpackBones.isEmpty()) {
matrixStack.pushPose();
translateToBackpack(matrixStack, geoModel);
matrixStack.translate(0, -1.5, 0);
matrixStack.scale(0.7F, 0.7F, 0.7F);
matrixStack.translate(0, -1.5, 0.02);
matrixStack.scale(0.65F, 0.65F, 0.65F);
matrixStack.mulPose(Axis.XN.rotationDegrees(5));
VertexConsumer buffer = bufferIn.getBuffer(RenderType.entityTranslucent(TEXTURE));
bannerModel.renderToBuffer(matrixStack, buffer, packedLightIn, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public void render(PoseStack matrixStack, MultiBufferSource bufferIn, int packed
return;
}
matrixStack.pushPose();
matrixStack.translate(0, 0.25, 0);
matrixStack.scale(0.7F, 0.7F, 0.7F);
matrixStack.translate(0, 0.5, 0.025);
matrixStack.scale(0.5F, 0.5F, 0.5F);
matrixStack.mulPose(Axis.XN.rotationDegrees(5));
VertexConsumer buffer = bufferIn.getBuffer(RenderType.entityTranslucent(TEXTURE));
bannerModel.renderToBuffer(matrixStack, buffer, packedLightIn, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
Expand Down

0 comments on commit 9fd7dad

Please sign in to comment.