diff --git a/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java index 52a26a3d1..92e923d10 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java @@ -187,7 +187,7 @@ public class GunEventHandler { if (!player.level().isClientSide()) { float headshot = (float) GunsTool.getGunDoubleTag(stack, "Headshot", 0); float damage = (float) (GunsTool.getGunDoubleTag(stack, "Damage", 0) + stack.getOrCreateTag().getDouble("sentinelChargeDamage")) * (float) perkDamage(stack); - float velocity = (float) ((GunsTool.getGunDoubleTag(stack, "Velocity", 0) + stack.getOrCreateTag().getDouble("CustomVelocity")) * perkSpeed(stack)); + float velocity = (float) ((GunsTool.getGunDoubleTag(stack, "Velocity", 0) + GunsTool.getGunDoubleTag(stack, "CustomVelocity", 0)) * perkSpeed(stack)); int projectileAmount = GunsTool.getGunIntTag(stack, "ProjectileAmount", 1); float bypassArmorRate = (float) GunsTool.getGunDoubleTag(stack, "BypassesArmor", 0); boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom; diff --git a/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Trachelium.java b/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Trachelium.java index c62db5f77..a7f4b2ba7 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Trachelium.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/gun/handgun/Trachelium.java @@ -275,12 +275,12 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem { } if (scopeType > 0 || gripType > 0) { - tag.putDouble("CustomVelocity", 15); + GunsTool.setGunDoubleTag(stack, "CustomVelocity", 15); GunsTool.setGunDoubleTag(stack, "BypassesArmor", 0.4); GunsTool.setGunDoubleTag(stack, "Damage", 21); GunsTool.setGunDoubleTag(stack, "Headshot", 2.5); } else { - tag.putDouble("CustomVelocity", 0); + GunsTool.setGunDoubleTag(stack, "CustomVelocity", 0); GunsTool.setGunDoubleTag(stack, "BypassesArmor", 0.3); GunsTool.setGunDoubleTag(stack, "Damage", 19); GunsTool.setGunDoubleTag(stack, "Headshot", 2);