修复大量NBT名称替换错误

This commit is contained in:
Light_Quanta 2024-05-18 02:59:42 +08:00
parent 508f5e0a51
commit cfda1e61e6
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
55 changed files with 138 additions and 138 deletions

View file

@ -223,7 +223,7 @@ public class ClientEventHandler {
if ((entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) { if ((entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zooming) {
if (entity.getPersistentData().getDouble("zoom_time") < 1) { if (entity.getPersistentData().getDouble("zoom_time") < 1) {
entity.getPersistentData().putDouble("zoom_time", entity.getPersistentData().putDouble("zoom_time",
(entity.getPersistentData().getDouble("zoom_time") + entity.getMainHandItem().getOrCreateTag().getDouble("zoom_firing") * 0.02 * times)); (entity.getPersistentData().getDouble("zoom_time") + entity.getMainHandItem().getOrCreateTag().getDouble("zoom_speed") * 0.02 * times));
} else { } else {
entity.getPersistentData().putDouble("zoom_time", 1); entity.getPersistentData().putDouble("zoom_time", 1);
} }
@ -253,8 +253,8 @@ public class ClientEventHandler {
ItemStack stack = entity.getMainHandItem(); ItemStack stack = entity.getMainHandItem();
float times = 45f / fps; float times = 45f / fps;
amplitude = 15000 * stack.getOrCreateTag().getDouble("recoily") amplitude = 15000 * stack.getOrCreateTag().getDouble("recoil_y")
* stack.getOrCreateTag().getDouble("recoilx"); * stack.getOrCreateTag().getDouble("recoil_x");
var data = entity.getPersistentData(); var data = entity.getPersistentData();
if (entity.isShiftKeyDown() && entity.getBbHeight() >= 1 && data.getDouble("prone") == 0) { if (entity.isShiftKeyDown() && entity.getBbHeight() >= 1 && data.getDouble("prone") == 0) {
pose = 0.9; pose = 0.9;

View file

@ -190,7 +190,7 @@ public class GunEventHandler {
int cooldown = (int) stack.getOrCreateTag().getDouble("fire_interval") + (int) stack.getOrCreateTag().getDouble("fire_sequence") - (int) stack.getOrCreateTag().getDouble("fire_increase"); int cooldown = (int) stack.getOrCreateTag().getDouble("fire_interval") + (int) stack.getOrCreateTag().getDouble("fire_sequence") - (int) stack.getOrCreateTag().getDouble("fire_increase");
player.getCooldowns().addCooldown(stack.getItem(), cooldown); player.getCooldowns().addCooldown(stack.getItem(), cooldown);
for (int index0 = 0; index0 < (int) stack.getOrCreateTag().getDouble("projectileamount"); index0++) { for (int index0 = 0; index0 < (int) stack.getOrCreateTag().getDouble("projectile_amount"); index0++) {
gunShoot(player); gunShoot(player);
} }

View file

@ -394,8 +394,8 @@ public class PlayerEventHandler {
if (!player.getMainHandItem().is(TargetModTags.Items.GUN)) return; if (!player.getMainHandItem().is(TargetModTags.Items.GUN)) return;
CompoundTag tag = player.getMainHandItem().getOrCreateTag(); CompoundTag tag = player.getMainHandItem().getOrCreateTag();
float recoilX = (float) tag.getDouble("recoilx"); float recoilX = (float) tag.getDouble("recoil_x");
float recoilY = (float) tag.getDouble("recoily"); float recoilY = (float) tag.getDouble("recoil_y");
var capability = player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null); var capability = player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null);
float recoilYaw = capability.map(c -> c.recoilHorizon).orElse(0d).floatValue(); float recoilYaw = capability.map(c -> c.recoilHorizon).orElse(0d).floatValue();

View file

@ -82,7 +82,7 @@ public class AK47Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
} }

View file

@ -82,7 +82,7 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.aa12.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.aa12.draw"));
} }

View file

@ -83,7 +83,7 @@ public class Abekiri extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) { if (stack.getOrCreateTag().getInt("draw_time") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ab.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ab.draw"));
} }

View file

@ -74,7 +74,7 @@ public class BocekItem extends GunItem implements GeoItem, AnimatedItem {
LocalPlayer player = Minecraft.getInstance().player; LocalPlayer player = Minecraft.getInstance().player;
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.bocek.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.bocek.draw"));
} }

View file

@ -82,7 +82,7 @@ public class Devotion extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.devotion.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.devotion.draw"));
} }

View file

@ -47,7 +47,7 @@ public abstract class GunItem extends Item {
if (tag.getBoolean("draw")) { if (tag.getBoolean("draw")) {
tag.putBoolean("draw", false); tag.putBoolean("draw", false);
tag.putDouble("drawtime", 0); tag.putInt("draw_time", 0);
entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> { entity.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
capability.zooming = false; capability.zooming = false;
capability.syncPlayerVariables(entity); capability.syncPlayerVariables(entity);
@ -77,8 +77,8 @@ public abstract class GunItem extends Item {
} }
if (mainHandItem == itemstack.getItem()) { if (mainHandItem == itemstack.getItem()) {
if (tag.getDouble("drawtime") < 50) { if (tag.getInt("draw_time") < 50) {
tag.putDouble("drawtime", (tag.getDouble("drawtime") + 1)); tag.putInt("draw_time", (tag.getInt("draw_time") + 1));
} }
} }
if (tag.getInt("fire_animation") > 0) { if (tag.getInt("fire_animation") > 0) {

View file

@ -77,7 +77,7 @@ public class Hk416Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
} }

View file

@ -86,7 +86,7 @@ public class HuntingRifle extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.hunting_rifle.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.hunting_rifle.draw"));
} }

View file

@ -89,7 +89,7 @@ public class Kraber extends GunItem implements GeoItem, AnimatedItem {
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) { if (stack.getOrCreateTag().getInt("draw_time") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.kraber.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.kraber.draw"));
} }

View file

@ -77,7 +77,7 @@ public class M4Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m4.draw"));
} }

View file

@ -77,7 +77,7 @@ public class M60Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) { if (stack.getOrCreateTag().getInt("draw_time") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m60.draw"));
} }

View file

@ -83,7 +83,7 @@ public class M79Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m79.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m79.draw"));
} }

View file

@ -80,7 +80,7 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
if (transformType != null && transformType.firstPerson()) { if (transformType != null && transformType.firstPerson()) {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m870.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m870.draw"));
} }

View file

@ -77,7 +77,7 @@ public class M98bItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.m98b.draw"));
} }

View file

@ -79,7 +79,7 @@ public class MarlinItem extends GunItem implements GeoItem, AnimatedItem {
if (transformType != null && transformType.firstPerson()) { if (transformType != null && transformType.firstPerson()) {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.marlin.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.marlin.draw"));
} }

View file

@ -112,7 +112,7 @@ public class Minigun extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 29) { if (stack.getOrCreateTag().getInt("draw_time") < 29) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.minigun.draw"));
} }

View file

@ -77,7 +77,7 @@ public class Mk14Item extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.model.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.model.draw"));
} }

View file

@ -78,7 +78,7 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.draw"));
} }

View file

@ -77,7 +77,7 @@ public class RpkItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.ak47.draw"));
} }

View file

@ -98,7 +98,7 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sentinel.draw"));
} }
@ -122,11 +122,11 @@ public class SentinelItem extends GunItem implements GeoItem, AnimatedItem {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.reload2")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.reload2"));
} }
if (stack.getOrCreateTag().getDouble("chargingtime") > 127 && stack.getOrCreateTag().getDouble("charging") == 1) { if (stack.getOrCreateTag().getDouble("charging_time") > 127 && stack.getOrCreateTag().getDouble("charging") == 1) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.chargep")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.chargep"));
} }
if (stack.getOrCreateTag().getDouble("chargingtime") < 127 && stack.getOrCreateTag().getDouble("chargingtime") > 0 && stack.getOrCreateTag().getDouble("charging") == 1) { if (stack.getOrCreateTag().getDouble("charging_time") < 127 && stack.getOrCreateTag().getDouble("charging_time") > 0 && stack.getOrCreateTag().getDouble("charging") == 1) {
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.charge")); return event.setAndContinue(RawAnimation.begin().thenPlay("animation.sentinel.charge"));
} }

View file

@ -82,7 +82,7 @@ public class SksItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 16) { if (stack.getOrCreateTag().getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sks.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.sks.draw"));
} }

View file

@ -77,7 +77,7 @@ public class SvdItem extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
var tag = stack.getOrCreateTag(); var tag = stack.getOrCreateTag();
if (tag.getDouble("drawtime") < 16) { if (tag.getInt("draw_time") < 16) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.svd.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.svd.draw"));
} }

View file

@ -84,7 +84,7 @@ public class Taser extends GunItem implements GeoItem, AnimatedItem {
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) { if (stack.getOrCreateTag().getInt("draw_time") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.taser.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.taser.draw"));
} }

View file

@ -88,7 +88,7 @@ public class Trachelium extends GunItem implements GeoItem, AnimatedItem {
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) { if (stack.getOrCreateTag().getInt("draw_time") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.trachelium.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.trachelium.draw"));
} }

View file

@ -164,7 +164,7 @@ public class VectorItem extends GunItem implements GeoItem, AnimatedItem {
ItemStack stack = player.getMainHandItem(); ItemStack stack = player.getMainHandItem();
if (this.animationProcedure.equals("empty")) { if (this.animationProcedure.equals("empty")) {
if (stack.getOrCreateTag().getDouble("drawtime") < 11) { if (stack.getOrCreateTag().getInt("draw_time") < 11) {
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.vec.draw")); return event.setAndContinue(RawAnimation.begin().thenLoop("animation.vec.draw"));
} }

View file

@ -70,7 +70,7 @@ public class FireModeMessage {
ItemStack mainHandItem = player.getMainHandItem(); ItemStack mainHandItem = player.getMainHandItem();
CompoundTag tag = mainHandItem.getOrCreateTag(); CompoundTag tag = mainHandItem.getOrCreateTag();
Item item = mainHandItem.getItem(); Item item = mainHandItem.getItem();
int fireMode = (int) tag.getInt("fire_mode"); int fireMode = tag.getInt("fire_mode");
if (item == TargetModItems.AK_47.get() if (item == TargetModItems.AK_47.get()
|| item == TargetModItems.M_4.get() || item == TargetModItems.M_4.get()
@ -86,7 +86,7 @@ public class FireModeMessage {
if (item == TargetModItems.SENTINEL.get() && !(player.getCooldowns().isOnCooldown(item)) && tag.getDouble("charging") == 0) { if (item == TargetModItems.SENTINEL.get() && !(player.getCooldowns().isOnCooldown(item)) && tag.getDouble("charging") == 0) {
tag.putDouble("charging", 1); tag.putDouble("charging", 1);
tag.putDouble("cid", (Mth.nextDouble(RandomSource.create(), 1, 1919810))); tag.putDouble("cid", (Mth.nextDouble(RandomSource.create(), 1, 1919810)));
tag.putDouble("chargingtime", 128); tag.putDouble("charging_time", 128);
} }
} }
} }

View file

@ -73,17 +73,17 @@ public class SentinelWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
if (itemstack.getOrCreateTag().getDouble("firing") > 0) { if (itemstack.getOrCreateTag().getDouble("firing") > 0) {
itemstack.getOrCreateTag().putDouble("firing", (itemstack.getOrCreateTag().getDouble("firing") - 1)); itemstack.getOrCreateTag().putDouble("firing", (itemstack.getOrCreateTag().getDouble("firing") - 1));
} }
if (itemstack.getOrCreateTag().getDouble("zoom_firing") > 0) { if (itemstack.getOrCreateTag().getDouble("zoom_speed") > 0) {
itemstack.getOrCreateTag().putDouble("zoom_firing", (itemstack.getOrCreateTag().getDouble("zoom_firing") - 1)); itemstack.getOrCreateTag().putDouble("zoom_speed", (itemstack.getOrCreateTag().getDouble("zoom_speed") - 1));
} }
cid = itemstack.getOrCreateTag().getDouble("cid"); cid = itemstack.getOrCreateTag().getDouble("cid");
if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") != itemstack.getOrCreateTag().getDouble("cid")) { if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") != itemstack.getOrCreateTag().getDouble("cid")) {
itemstack.getOrCreateTag().putDouble("charging", 0); itemstack.getOrCreateTag().putDouble("charging", 0);
itemstack.getOrCreateTag().putDouble("chargingtime", 0); itemstack.getOrCreateTag().putDouble("charging_time", 0);
} }
if (itemstack.getOrCreateTag().getDouble("charging") == 1) { if (itemstack.getOrCreateTag().getDouble("charging") == 1) {
if (itemstack.getOrCreateTag().getDouble("chargingtime") == 127) { if (itemstack.getOrCreateTag().getDouble("charging_time") == 127) {
entity.getPersistentData().putDouble("cid", cid); entity.getPersistentData().putDouble("cid", cid);
{ {
Entity _ent = entity; Entity _ent = entity;
@ -95,17 +95,17 @@ public class SentinelWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
} }
if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == itemstack.getItem() if ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getItem() == itemstack.getItem()
&& (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) { && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) {
if (itemstack.getOrCreateTag().getDouble("chargingtime") > 0) { if (itemstack.getOrCreateTag().getDouble("charging_time") > 0) {
itemstack.getOrCreateTag().putDouble("chargingtime", (itemstack.getOrCreateTag().getDouble("chargingtime") - 1)); itemstack.getOrCreateTag().putDouble("charging_time", (itemstack.getOrCreateTag().getDouble("charging_time") - 1));
} }
} else { } else {
itemstack.getOrCreateTag().putDouble("charging", 0); itemstack.getOrCreateTag().putDouble("charging", 0);
itemstack.getOrCreateTag().putDouble("chargingtime", 0); itemstack.getOrCreateTag().putDouble("charging_time", 0);
} }
if (itemstack.getOrCreateTag().getDouble("chargingtime") == 16 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) { if (itemstack.getOrCreateTag().getDouble("charging_time") == 16 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) {
itemstack.getOrCreateTag().putDouble("power", 100); itemstack.getOrCreateTag().putDouble("power", 100);
} }
if (itemstack.getOrCreateTag().getDouble("chargingtime") == 1 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) { if (itemstack.getOrCreateTag().getDouble("charging_time") == 1 && (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getOrCreateTag().getDouble("cid") == cid) {
itemstack.getOrCreateTag().putDouble("charging", 0); itemstack.getOrCreateTag().putDouble("charging", 0);
} }
} }

View file

@ -84,7 +84,7 @@ public class TooltipTool {
public static void addSentinelTips(List<Component> tooltip, ItemStack stack) { public static void addSentinelTips(List<Component> tooltip, ItemStack stack) {
tooltip.add(Component.literal("")); tooltip.add(Component.literal(""));
boolean flag = ItemNBTTool.getDouble(stack, "chargingtime", 0) > 0; boolean flag = ItemNBTTool.getDouble(stack, "charging_time", 0) > 0;
if (flag) { if (flag) {
double damage = (ItemNBTTool.getDouble(stack, "damage", 0) + double damage = (ItemNBTTool.getDouble(stack, "damage", 0) +

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 0.95, "zoom_speed": 0.95,
"zoom": 1.25, "zoom": 1.25,
"dev": 3.5, "dev": 3.5,
"recoilx": 0.016, "recoil_x": 0.016,
"recoily": 0.007, "recoil_y": 0.007,
"damage": 1.5, "damage": 1.5,
"headshot": 1.5, "headshot": 1.5,
"velocity": 16, "velocity": 16,
"mag": 25, "mag": 25,
"projectileamount": 8, "projectile_amount": 8,
"fire_interval": 4, "fire_interval": 4,
"weight": 1 "weight": 1
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.4, "zoom_speed": 1.4,
"zoom": 1.25, "zoom": 1.25,
"dev": 5, "dev": 5,
"recoilx": 0.005, "recoil_x": 0.005,
"recoily": 0.026, "recoil_y": 0.026,
"damage": 2.5, "damage": 2.5,
"headshot": 1.5, "headshot": 1.5,
"velocity": 15, "velocity": 15,
"mag": 2, "mag": 2,
"projectileamount": 8, "projectile_amount": 8,
"fire_interval": 2, "fire_interval": 2,
"weight": 0 "weight": 0
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.1, "zoom_speed": 1.1,
"zoom": 1.25, "zoom": 1.25,
"dev": 4, "dev": 4,
"recoilx": 0.0025, "recoil_x": 0.0025,
"recoily": 0.012, "recoil_y": 0.012,
"damage": 8.5, "damage": 8.5,
"headshot": 1.75, "headshot": 1.75,
"velocity": 30, "velocity": 30,
"mag": 30, "mag": 30,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 2, "fire_interval": 2,
"weight": 1 "weight": 1
} }

View file

@ -1,9 +1,9 @@
{ {
"zoomspeed": 1, "zoom_speed": 1,
"zoom": 2, "zoom": 2,
"dev": 4, "dev": 4,
"recoilx": 0.005, "recoil_x": 0.005,
"recoily": 0.003, "recoil_y": 0.003,
"headshot": 1.5, "headshot": 1.5,
"damage": 24, "damage": 24,
"weight": 1, "weight": 1,

View file

@ -1,16 +1,16 @@
{ {
"zoomspeed": 0.9, "zoom_speed": 0.9,
"zoom": 2, "zoom": 2,
"dev": 5, "dev": 5,
"bipod": 1, "bipod": 1,
"recoilx": 0.0018, "recoil_x": 0.0018,
"recoily": 0.01, "recoil_y": 0.01,
"damage": 7, "damage": 7,
"headshot": 2, "headshot": 2,
"velocity": 40, "velocity": 40,
"mag": 55, "mag": 55,
"firemode": 2, "fire_mode": 2,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 5, "fire_interval": 5,
"weight": 1 "weight": 1
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.3, "zoom_speed": 1.3,
"zoom": 1.25, "zoom": 1.25,
"dev": 4, "dev": 4,
"recoilx": 0.0016, "recoil_x": 0.0016,
"recoily": 0.009, "recoil_y": 0.009,
"damage": 7.5, "damage": 7.5,
"headshot": 2, "headshot": 2,
"velocity": 45, "velocity": 45,
"mag": 30, "mag": 30,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 1, "fire_interval": 1,
"weight": 1 "weight": 1
} }

View file

@ -1,13 +1,13 @@
{ {
"zoomspeed": 1, "zoom_speed": 1,
"zoom": 1.25, "zoom": 1.25,
"dev": 7, "dev": 7,
"recoilx": 0.004, "recoil_x": 0.004,
"recoily": 0.03, "recoil_y": 0.03,
"damage": 40, "damage": 40,
"headshot": 3, "headshot": 3,
"velocity": 50, "velocity": 50,
"mag": 1, "mag": 1,
"projectileamount": 1, "projectile_amount": 1,
"weight": 1 "weight": 1
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 0.8, "zoom_speed": 0.8,
"zoom": 3, "zoom": 3,
"bipod": 1, "bipod": 1,
"dev": 6, "dev": 6,
"recoilx": 0.008, "recoil_x": 0.008,
"recoily": 0.018, "recoil_y": 0.018,
"damage": 70, "damage": 70,
"headshot": 3, "headshot": 3,
"velocity": 40, "velocity": 40,
"projectileamount": 1, "projectile_amount": 1,
"mag": 4, "mag": 4,
"fire_interval": 10, "fire_interval": 10,
"bolt_action_time": 30, "bolt_action_time": 30,

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.15, "zoom_speed": 1.15,
"zoom": 1.25, "zoom": 1.25,
"dev": 4, "dev": 4,
"recoilx": 0.0015, "recoil_x": 0.0015,
"recoily": 0.011, "recoil_y": 0.011,
"damage": 7, "damage": 7,
"headshot": 2, "headshot": 2,
"velocity": 45, "velocity": 45,
"mag": 30, "mag": 30,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 1, "fire_interval": 1,
"weight": 1 "weight": 1
} }

View file

@ -1,16 +1,16 @@
{ {
"zoomspeed": 0.85, "zoom_speed": 0.85,
"zoom": 1.25, "zoom": 1.25,
"dev": 5, "dev": 5,
"bipod": 1, "bipod": 1,
"recoilx": 0.004, "recoil_x": 0.004,
"recoily": 0.014, "recoil_y": 0.014,
"damage": 9, "damage": 9,
"headshot": 2, "headshot": 2,
"velocity": 40, "velocity": 40,
"mag": 100, "mag": 100,
"firemode": 2, "fire_mode": 2,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 2, "fire_interval": 2,
"weight": 2 "weight": 2
} }

View file

@ -1,9 +1,9 @@
{ {
"zoomspeed": 0.95, "zoom_speed": 0.95,
"zoom": 1.25, "zoom": 1.25,
"dev": 1, "dev": 1,
"recoilx": 0.004, "recoil_x": 0.004,
"recoily": 0.023, "recoil_y": 0.023,
"damage": 40, "damage": 40,
"velocity": 3.75, "velocity": 3.75,
"mag": 1, "mag": 1,

View file

@ -1,9 +1,9 @@
{ {
"zoomspeed": 1.1, "zoom_speed": 1.1,
"zoom": 1.25, "zoom": 1.25,
"dev": 3, "dev": 3,
"recoilx": 0.009, "recoil_x": 0.009,
"recoily": 0.03, "recoil_y": 0.03,
"damage": 2, "damage": 2,
"headshot": 1.5, "headshot": 1.5,
"velocity": 20, "velocity": 20,

View file

@ -1,13 +1,13 @@
{ {
"zoomspeed": 0.85, "zoom_speed": 0.85,
"zoom": 4, "zoom": 4,
"dev": 6, "dev": 6,
"recoilx": 0.007, "recoil_x": 0.007,
"recoily": 0.013, "recoil_y": 0.013,
"damage": 28, "damage": 28,
"headshot": 3, "headshot": 3,
"velocity": 55, "velocity": 55,
"projectileamount": 1, "projectile_amount": 1,
"mag": 5, "mag": 5,
"fire_interval": 6, "fire_interval": 6,
"bolt_action_time": 18, "bolt_action_time": 18,

View file

@ -1,9 +1,9 @@
{ {
"zoomspeed": 1.1, "zoom_speed": 1.1,
"zoom": 1.25, "zoom": 1.25,
"dev": 2, "dev": 2,
"recoilx": 0.004, "recoil_x": 0.004,
"recoily": 0.011, "recoil_y": 0.011,
"damage": 16, "damage": 16,
"headshot": 2.5, "headshot": 2.5,
"velocity": 27, "velocity": 27,

View file

@ -1,12 +1,12 @@
{ {
"zoom": 1, "zoom": 1,
"dev": 5, "dev": 5,
"recoilx": 0.024, "recoil_x": 0.024,
"recoily": 0.005, "recoil_y": 0.005,
"damage": 8, "damage": 8,
"headshot": 2, "headshot": 2,
"velocity": 40, "velocity": 40,
"firemode": 2, "fire_mode": 2,
"fire_interval": 1, "fire_interval": 1,
"weight": 2 "weight": 2
} }

View file

@ -1,15 +1,15 @@
{ {
"zoomspeed": 0.9, "zoom_speed": 0.9,
"zoom": 3.4, "zoom": 3.4,
"dev": 6, "dev": 6,
"bipod": 1, "bipod": 1,
"recoilx": 0.006, "recoil_x": 0.006,
"recoily": 0.014, "recoil_y": 0.014,
"damage": 12, "damage": 12,
"headshot": 2.5, "headshot": 2.5,
"velocity": 45, "velocity": 45,
"mag": 20, "mag": 20,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 2, "fire_interval": 2,
"weight": 1 "weight": 1
} }

View file

@ -1,9 +1,9 @@
{ {
"zoomspeed": 0.77, "zoom_speed": 0.77,
"zoom": 1.25, "zoom": 1.25,
"dev": 5, "dev": 5,
"recoilx": 0.008, "recoil_x": 0.008,
"recoily": 0.018, "recoil_y": 0.018,
"damage": 150, "damage": 150,
"velocity": 5.75, "velocity": 5.75,
"mag": 1, "mag": 1,

View file

@ -1,15 +1,15 @@
{ {
"zoomspeed": 1, "zoom_speed": 1,
"zoom": 1.25, "zoom": 1.25,
"dev": 5, "dev": 5,
"bipod": 1, "bipod": 1,
"recoilx": 0.0035, "recoil_x": 0.0035,
"recoily": 0.012, "recoil_y": 0.012,
"damage": 8.75, "damage": 8.75,
"headshot": 2, "headshot": 2,
"velocity": 35, "velocity": 35,
"mag": 75, "mag": 75,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 2, "fire_interval": 2,
"weight": 1 "weight": 1
} }

View file

@ -1,12 +1,12 @@
{ {
"zoomspeed": 0.95, "zoom_speed": 0.95,
"zoom": 3, "zoom": 3,
"dev": 6, "dev": 6,
"recoilx": 0.007, "recoil_x": 0.007,
"recoily": 0.018, "recoil_y": 0.018,
"damage": 25, "damage": 25,
"mag": 5, "mag": 5,
"projectileamount": 1, "projectile_amount": 1,
"headshot": 2, "headshot": 2,
"velocity": 50, "velocity": 50,
"fire_interval": 2, "fire_interval": 2,

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1, "zoom_speed": 1,
"zoom": 1.25, "zoom": 1.25,
"dev": 5, "dev": 5,
"recoilx": 0.004, "recoil_x": 0.004,
"recoily": 0.015, "recoil_y": 0.015,
"damage": 9.5, "damage": 9.5,
"headshot": 1.75, "headshot": 1.75,
"velocity": 40, "velocity": 40,
"mag": 20, "mag": 20,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 3, "fire_interval": 3,
"weight": 1 "weight": 1
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 0.9, "zoom_speed": 0.9,
"zoom": 4, "zoom": 4,
"dev": 6, "dev": 6,
"recoilx": 0.008, "recoil_x": 0.008,
"recoily": 0.015, "recoil_y": 0.015,
"damage": 18, "damage": 18,
"headshot": 2.5, "headshot": 2.5,
"velocity": 50, "velocity": 50,
"mag": 10, "mag": 10,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 5, "fire_interval": 5,
"weight": 1 "weight": 1
} }

View file

@ -1,8 +1,8 @@
{ {
"dev": 2, "dev": 2,
"recoilx": 0.0001, "recoil_x": 0.0001,
"recoily": 0.002, "recoil_y": 0.002,
"zoomspeed": 2, "zoom_speed": 2,
"zoom": 1.25, "zoom": 1.25,
"damage": 5, "damage": 5,
"velocity": 3, "velocity": 3,

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.7, "zoom_speed": 1.7,
"zoom": 1.25, "zoom": 1.25,
"dev": 3, "dev": 3,
"recoilx": 0.005, "recoil_x": 0.005,
"recoily": 0.022, "recoil_y": 0.022,
"damage": 18, "damage": 18,
"headshot": 1.5, "headshot": 1.5,
"velocity": 60, "velocity": 60,
"mag": 8, "mag": 8,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 5, "fire_interval": 5,
"weight": 0 "weight": 0
} }

View file

@ -1,14 +1,14 @@
{ {
"zoomspeed": 1.6, "zoom_speed": 1.6,
"zoom": 1.25, "zoom": 1.25,
"dev": 3.5, "dev": 3.5,
"recoilx": 0.011, "recoil_x": 0.011,
"recoily": 0.004, "recoil_y": 0.004,
"damage": 4.5, "damage": 4.5,
"headshot": 1.5, "headshot": 1.5,
"velocity": 22, "velocity": 22,
"mag": 33, "mag": 33,
"projectileamount": 1, "projectile_amount": 1,
"fire_interval": 1, "fire_interval": 1,
"weight": 0 "weight": 0
} }