重置M4的枢轴和动画

This commit is contained in:
Atsuihsio 2025-01-09 22:04:00 +08:00
parent 18772a3620
commit 9b02d94674
4 changed files with 1788 additions and 2345 deletions

View file

@ -159,12 +159,12 @@ public class M4ItemRenderer extends GeoItemRenderer<M4Item> {
VertexConsumer sleeveBuilder = this.currentBuffer.getBuffer(RenderType.entityTranslucent(loc));
if (name.equals("Lefthand")) {
stack.translate(-1.0f * SCALE_RECIPROCAL, 2.0f * SCALE_RECIPROCAL, 0.0f);
AnimationHelper.renderPartOverBone(model.leftArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone(model.leftSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone2(model.leftArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone2(model.leftSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
} else {
stack.translate(SCALE_RECIPROCAL, 2.0f * SCALE_RECIPROCAL, 0.0f);
AnimationHelper.renderPartOverBone(model.rightArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone(model.rightSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone2(model.rightArm, bone, stack, armBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
AnimationHelper.renderPartOverBone2(model.rightSleeve, bone, stack, sleeveBuilder, packedLightIn, OverlayTexture.NO_OVERLAY, 1);
}
this.currentBuffer.getBuffer(this.renderType);

View file

@ -27,26 +27,14 @@
}
},
"Righthand": {
"rotation": {
"0.0": [0, 0, 0],
"0.2": [-6.9958, -33.59868, 16.97772]
},
"position": {
"0.0": [0, 0, 0],
"0.2": [-1.75, 0.35, 0.95]
}
"rotation": [72.69469, -60.09451, -36.63152],
"position": [19, -18.6, 14.8],
"scale": 0
},
"Lefthand": {
"rotation": {
"0.0": [0, 0, 0],
"0.2": [-22.85123, -5.28437, 45.34195],
"0.4083": [-37.36283, 0.56643, 63.22664]
},
"position": {
"0.0": [0, 0, 0],
"0.2": [-1.15, -0.4, -5.5],
"0.4083": [-1.65, -0.4, -4.8]
}
"rotation": [-51.42913, -7.99833, 65.60001],
"position": [21.85, -19.65, 7],
"scale": 0
}
}
},

View file

@ -7,8 +7,8 @@
"texture_width": 256,
"texture_height": 256,
"visible_bounds_width": 34,
"visible_bounds_height": 6,
"visible_bounds_offset": [0, 0, 0]
"visible_bounds_height": 9,
"visible_bounds_offset": [0, 1.5, 0]
},
"bones": [
{
@ -21917,43 +21917,19 @@
{
"name": "Lefthand",
"parent": "magazine",
"pivot": [4.85, -4.65, -0.5],
"rotation": [101.68941, -38.04772, -145.7184],
"pivot": [0.48636, 0.82962, -11.04903],
"rotation": [-85.23398, -46.56837, -132.13516],
"cubes": [
{
"origin": [2.85, -4.65, -2.5],
"origin": [-1.51364, -0.17038, -13.04903],
"size": [4, 12, 4],
"pivot": [4.85, -0.65, -0.5],
"rotation": [-180, 8, 180],
"uv": {
"north": {"uv": [1.875, 0.375], "uv_size": [0.875, 1]},
"east": {"uv": [1.875, 0.375], "uv_size": [0.875, 1]},
"south": {"uv": [1.875, 0.375], "uv_size": [0.875, 1]},
"west": {"uv": [1.875, 0.375], "uv_size": [0.875, 1]},
"up": {"uv": [2.75, 1.375], "uv_size": [-0.875, -1]},
"down": {"uv": [2.75, 1.375], "uv_size": [-0.875, -1]}
}
}
]
},
{
"name": "Righthand",
"parent": "0",
"pivot": [-2.8, -6.4, 10.9],
"rotation": [109.82005, 12.39135, 178.3425],
"cubes": [
{
"origin": [-4.8, -6.4, 8.9],
"size": [4, 12, 4],
"pivot": [-2.8, -0.4, 10.9],
"rotation": [-180, 0, 180],
"uv": {
"north": {"uv": [2.25, 0.25], "uv_size": [2.625, 0.625]},
"east": {"uv": [2.25, 0.25], "uv_size": [2.625, 0.625]},
"south": {"uv": [2.25, 0.25], "uv_size": [2.625, 0.625]},
"west": {"uv": [2.25, 0.25], "uv_size": [2.625, 0.625]},
"up": {"uv": [4.875, 0.875], "uv_size": [-2.625, -0.625]},
"down": {"uv": [4.875, 0.875], "uv_size": [-2.625, -0.625]}
"north": {"uv": [13.25, 24.75], "uv_size": [-2.25, -2]},
"east": {"uv": [13.25, 24.75], "uv_size": [-2.25, -2]},
"south": {"uv": [13.25, 24.75], "uv_size": [-2.25, -2]},
"west": {"uv": [12.5, 18.25], "uv_size": [-1.25, -2]},
"up": {"uv": [11, 22.75], "uv_size": [2.25, 2]},
"down": {"uv": [11, 22.75], "uv_size": [2.25, 2]}
}
}
]
@ -21971,6 +21947,26 @@
}
}
]
},
{
"name": "Righthand",
"parent": "0",
"pivot": [-0.80468, -2.93634, 1.04587],
"rotation": [-75.81552, 9.63414, -177.43973],
"cubes": [
{
"origin": [-2.80468, -3.93634, -0.95413],
"size": [4, 12, 4],
"uv": {
"north": {"uv": [10.5, 31], "uv_size": [-0.5, 0.5]},
"east": {"uv": [10.5, 31], "uv_size": [-0.5, 0.5]},
"south": {"uv": [10.5, 31], "uv_size": [-0.5, 0.5]},
"west": {"uv": [10.5, 31], "uv_size": [-0.5, 0.5]},
"up": {"uv": [10, 31.5], "uv_size": [0.5, -0.5]},
"down": {"uv": [10, 31.5], "uv_size": [0.5, -0.5]}
}
}
]
}
]
}