优化NBT#FinishTime
This commit is contained in:
parent
3b51f00bcc
commit
1862382211
6 changed files with 8 additions and 7 deletions
|
@ -678,8 +678,9 @@ public class GunEventHandler {
|
|||
// 三阶段
|
||||
if ((tag.getInt("iterative") == 1 && tag.getInt("reload_stage") == 3) || tag.getBoolean("force_stage3_start")) {
|
||||
tag.putBoolean("force_stage3_start", false);
|
||||
tag.putInt("finish", (int) tag.getDouble("finish_time") + 2);
|
||||
player.getCooldowns().addCooldown(stack.getItem(), (int) tag.getDouble("finish_time") + 2);
|
||||
int finishTime = GunsTool.getGunIntTag(stack, "FinishTime", 0);
|
||||
tag.putInt("finish", finishTime + 2);
|
||||
player.getCooldowns().addCooldown(stack.getItem(), finishTime + 2);
|
||||
playGunEndReloadSounds(player);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ public class GunsTool {
|
|||
private static final Set<String> STRING_SET = Set.of("EmptyReloadTime", "FireMode", "Weight", "SoundRadius", "BurstSize", "ProjectileAmount",
|
||||
"Spread", "NormalReloadTime", "Headshot", "Semi", "Burst", "Auto", "RecoilX", "RecoilY", "Velocity", "Damage", "BypassesArmor",
|
||||
"RPM", "Magazine", "MinZoom", "MaxZoom", "CustomZoom", "ExplosionDamage", "ExplosionRadius", "BoltActionTime", "ClipLoad",
|
||||
"PrepareTime", "IterativeTime", "PrepareLoadTime");
|
||||
"PrepareTime", "IterativeTime", "PrepareLoadTime", "FinishTime");
|
||||
|
||||
public static void initGun(Level level, ItemStack stack, String location) {
|
||||
if (level.getServer() == null) return;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"ClipLoad": 1,
|
||||
"PrepareTime": 29,
|
||||
"IterativeTime": 11,
|
||||
"finish_time": 18,
|
||||
"FinishTime": 18,
|
||||
"BypassesArmor": 0.5,
|
||||
"SoundRadius": 18
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
"PrepareTime": 7,
|
||||
"PrepareLoadTime": 36,
|
||||
"IterativeTime": 16,
|
||||
"finish_time": 12,
|
||||
"FinishTime": 12,
|
||||
"BypassesArmor": 0.05,
|
||||
"SoundRadius": 16,
|
||||
"BoltActionTime": 11
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"Semi": 1,
|
||||
"PrepareTime": 7,
|
||||
"IterativeTime": 16,
|
||||
"finish_time": 19,
|
||||
"FinishTime": 19,
|
||||
"BypassesArmor": 0.3,
|
||||
"SoundRadius": 15,
|
||||
"BoltActionTime": 12
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"PrepareTime": 29,
|
||||
"prepare_empty": 16,
|
||||
"IterativeTime": 11,
|
||||
"finish_time": 18,
|
||||
"FinishTime": 18,
|
||||
"BypassesArmor": 0.54,
|
||||
"SoundRadius": 18
|
||||
}
|
Loading…
Add table
Reference in a new issue