修复动画bug,限制转速

This commit is contained in:
Atsuihsio 2024-07-31 20:42:27 +08:00
parent c506ed28be
commit 6d6861754e
2 changed files with 21 additions and 2 deletions

View file

@ -38,13 +38,20 @@ public class MouseHandlerMixin {
ItemStack stack = mc.player.getMainHandItem(); ItemStack stack = mc.player.getMainHandItem();
if (player.getVehicle() != null && (player.getVehicle() instanceof Mk42Entity || player.getVehicle() instanceof Mle1934Entity)) { if (player.getVehicle() != null && player.getVehicle() instanceof Mk42Entity) {
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) { if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
return 0.12; return 0.12;
} else { } else {
return 0.23; return 0.23;
} }
} }
if (player.getVehicle() != null && player.getVehicle() instanceof Mle1934Entity) {
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zoom) {
return 0.09;
} else {
return 0.19;
}
}
if (!stack.is(ModTags.Items.GUN)) { if (!stack.is(ModTags.Items.GUN)) {
return original; return original;

View file

@ -2,7 +2,19 @@
"format_version": "1.8.0", "format_version": "1.8.0",
"animations": { "animations": {
"animation.mle1934.idle": { "animation.mle1934.idle": {
"loop": true "loop": true,
"bones": {
"flare": {
"scale": {
"vector": [0, 0, 0]
}
},
"flare2": {
"scale": {
"vector": [0, 0, 0]
}
}
}
}, },
"animation.mle1934.fire": { "animation.mle1934.fire": {
"loop": "hold_on_last_frame", "loop": "hold_on_last_frame",