Fix sonic boom duration ticking below zero
@@ -80,11 +80,14 @@ public class WardenEntity extends MonsterEntity implements Tickable {
session.sendUpstreamPacket(packet);
}
- if (--sonicBoomTickDuration == 0) {
+ if (sonicBoomTickDuration > 0) {
+ sonicBoomTickDuration--;
+ if (sonicBoomTickDuration == 0) {
setFlag(EntityFlag.SONIC_BOOM, false);
updateBedrockMetadata();
}
}
+ }
public void onSonicBoom() {
setFlag(EntityFlag.SONIC_BOOM, true);
