From 1bdbc84e64805299d282a269ef5699a275d4535e Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Sat, 15 Jun 2024 08:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A0=E7=89=B9=E6=9E=97?= =?UTF-8?q?=E5=8F=AF=E5=8F=B3=E9=94=AE=E9=A2=84=E7=83=AD=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/mcreator/target/event/GunEventHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/mcreator/target/event/GunEventHandler.java b/src/main/java/net/mcreator/target/event/GunEventHandler.java index db53d479a..0b0e916f6 100644 --- a/src/main/java/net/mcreator/target/event/GunEventHandler.java +++ b/src/main/java/net/mcreator/target/event/GunEventHandler.java @@ -179,7 +179,7 @@ public class GunEventHandler { return; } - if (player.getPersistentData().getBoolean("firing") && !player.isSprinting()) { + if ((player.getPersistentData().getBoolean("firing") || (player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).zoom) && !player.isSprinting()) { if (tag.getDouble("minigun_rotation") < 10) { tag.putDouble("minigun_rotation", (tag.getDouble("minigun_rotation") + 1)); } @@ -192,7 +192,7 @@ public class GunEventHandler { if (tag.getDouble("overheat") == 0 && (player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).rifleAmmo > 0 - && !(player.getCooldowns().isOnCooldown(stack.getItem())) && tag.getDouble("minigun_rotation") >= 10) { + && !(player.getCooldowns().isOnCooldown(stack.getItem())) && tag.getDouble("minigun_rotation") >= 10 && player.getPersistentData().getBoolean("firing")) { tag.putDouble("heat", (tag.getDouble("heat") + 0.5)); if (tag.getDouble("heat") >= 50.5) { tag.putDouble("overheat", 40);