mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix sonic boom duration ticking below zero
This commit is contained in:
parent
365f8cf7e3
commit
2e3e7c6949
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue