From 2e3e7c69496bba3ee8de470aae697ee5c1cf42e9 Mon Sep 17 00:00:00 2001 From: davchoo Date: Tue, 31 May 2022 15:15:15 -0400 Subject: [PATCH] Fix sonic boom duration ticking below zero --- .../geyser/entity/type/living/monster/WardenEntity.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/entity/type/living/monster/WardenEntity.java b/core/src/main/java/org/geysermc/geyser/entity/type/living/monster/WardenEntity.java index e99bbd248..e5f81691e 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/type/living/monster/WardenEntity.java +++ b/core/src/main/java/org/geysermc/geyser/entity/type/living/monster/WardenEntity.java @@ -80,9 +80,12 @@ public class WardenEntity extends MonsterEntity implements Tickable { session.sendUpstreamPacket(packet); } - if (--sonicBoomTickDuration == 0) { - setFlag(EntityFlag.SONIC_BOOM, false); - updateBedrockMetadata(); + if (sonicBoomTickDuration > 0) { + sonicBoomTickDuration--; + if (sonicBoomTickDuration == 0) { + setFlag(EntityFlag.SONIC_BOOM, false); + updateBedrockMetadata(); + } } }