SKS重制动画,优化音效

This commit is contained in:
Atsuihsio 2024-05-26 12:54:09 +08:00
parent 78b8eebb7a
commit 754c3dabee
11 changed files with 1485 additions and 488 deletions

View file

@ -92,11 +92,11 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
}
if (stack.getOrCreateTag().getBoolean("reloading") && stack.getOrCreateTag().getBoolean("empty_reload")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.reload"));
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.reload_empty"));
}
if (stack.getOrCreateTag().getBoolean("reloading") && !stack.getOrCreateTag().getBoolean("empty_reload")) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.reload2"));
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sks.reload_normal"));
}
if (player.isSprinting() && player.onGround() && player.getPersistentData().getDouble("noRun") == 0) {
@ -175,7 +175,7 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
tag.putDouble("reload_time", 0);
}
if (tag.getBoolean("reloading") && tag.getInt("ammo") == 0) {
if (tag.getDouble("reload_time") == 57) {
if (tag.getDouble("reload_time") == 72) {
entity.getPersistentData().putDouble("id", id);
if (entity instanceof ServerPlayer serverPlayer) {
SoundTool.playLocalSound(serverPlayer, TargetModSounds.SKS_RELOAD_EMPTY.get(), 100, 1);
@ -198,7 +198,7 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
GunReload.reload(entity, GunInfo.Type.RIFLE);
}
} else if (tag.getBoolean("reloading") && tag.getInt("ammo") > 0) {
if (tag.getDouble("reload_time") == 41) {
if (tag.getDouble("reload_time") == 51) {
entity.getPersistentData().putDouble("id", id);
if (entity instanceof ServerPlayer serverPlayer) {
SoundTool.playLocalSound(serverPlayer, TargetModSounds.SKS_RELOAD_NORMAL.get(), 100, 1);

View file

@ -161,12 +161,12 @@ public class PlayerReloadProcedure {
tag.putBoolean("reloading", true);
tag.putBoolean("empty_reload", false);
tag.putDouble("id", (Mth.nextDouble(RandomSource.create(), 1, 1919810)));
tag.putDouble("reload_time", 41);
tag.putDouble("reload_time", 51);
} else if (tag.getInt("ammo") == 0) {
tag.putBoolean("reloading", true);
tag.putDouble("empty_reload", 1);
tag.putDouble("id", (Mth.nextDouble(RandomSource.create(), 1, 1919810)));
tag.putDouble("reload_time", 57);
tag.putDouble("reload_time", 72);
}
}
if (player.getMainHandItem().getItem() == TargetModItems.AK_47.get()

View file

@ -413,7 +413,7 @@
"vector": [0, 0, -1.07]
},
"2.3": {
"vector": [0.00031, 0.02116, 0.55984]
"vector": [0.00031, 0.02116, 0.2598]
},
"2.3833": {
"vector": [0, 0, 0]
@ -879,7 +879,7 @@
"vector": [0.00274, -0.00904, -0.77015]
},
"3.1167": {
"vector": [0.00031, 0.02116, 0.55984]
"vector": [0.00031, 0.02116, 0.1598]
},
"3.2": {
"vector": [0, 0, 0]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff