修复zoom相关命名错误

This commit is contained in:
Light_Quanta 2024-05-18 03:15:46 +08:00
parent cfda1e61e6
commit d9feb95cff
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
6 changed files with 9 additions and 9 deletions

View file

@ -110,7 +110,7 @@ public class CrossHairOverlay {
if (player == null) return false;
if (player.isSpectator()) return false;
if (!player.getMainHandItem().is(TargetModTags.Items.GUN) || !(player.getPersistentData().getDouble("zoom_time") < 7))
if (!player.getMainHandItem().is(TargetModTags.Items.GUN) || !(player.getPersistentData().getDouble("zoom_animation_time") < 7))
return false;
return !(player.getMainHandItem().getItem() == TargetModItems.M_79.get())

View file

@ -72,7 +72,7 @@ public class GunEventHandler {
}
double zoom;
if (player.getPersistentData().getDouble("zoom_time") > 4) {
if (player.getPersistentData().getDouble("zoom_animation_time") > 4) {
if (stack.is(TargetModTags.Items.SNIPER_RIFLE)) {
zoom = 0.0001;
} else if (stack.is(TargetModTags.Items.SHOTGUN)) {

View file

@ -199,7 +199,7 @@ public class LivingEntityEventHandler {
});
player.getPersistentData().putDouble("zoom_pos", 0);
player.getPersistentData().putDouble("zoom_time", 0);
player.getPersistentData().putDouble("zoom_animation_time", 0);
if (newStack.getOrCreateTag().getDouble("bolt_action_time") > 0) {
newStack.getOrCreateTag().putDouble("bolt_action_anim", 0);
}

View file

@ -272,11 +272,11 @@ public class PlayerEventHandler {
capability.syncPlayerVariables(player);
});
if (player.getPersistentData().getInt("zoom_time") < 10) {
player.getPersistentData().putInt("zoom_time", player.getPersistentData().getInt("zoom_time") + 1);
if (player.getPersistentData().getInt("zoom_animation_time") < 10) {
player.getPersistentData().putInt("zoom_animation_time", player.getPersistentData().getInt("zoom_animation_time") + 1);
}
} else {
player.getPersistentData().putInt("zoom_time", 0);
player.getPersistentData().putInt("zoom_animation_time", 0);
}
}
}

View file

@ -58,7 +58,7 @@ public class ZoomMessage {
capability.zooming = false;
capability.syncPlayerVariables(entity);
});
entity.getPersistentData().putDouble("zoom_time", 0);
entity.getPersistentData().putDouble("zoom_animation_time", 0);
}
}

View file

@ -73,8 +73,8 @@ public class SentinelWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
if (itemstack.getOrCreateTag().getDouble("firing") > 0) {
itemstack.getOrCreateTag().putDouble("firing", (itemstack.getOrCreateTag().getDouble("firing") - 1));
}
if (itemstack.getOrCreateTag().getDouble("zoom_speed") > 0) {
itemstack.getOrCreateTag().putDouble("zoom_speed", (itemstack.getOrCreateTag().getDouble("zoom_speed") - 1));
if (itemstack.getOrCreateTag().getDouble("zoom_firing") > 0) {
itemstack.getOrCreateTag().putDouble("zoom_firing", (itemstack.getOrCreateTag().getDouble("zoom_firing") - 1));
}
cid = itemstack.getOrCreateTag().getDouble("cid");