Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-20 06:50:09 +01:00
Set SnifferEntity digTicks to 0 when transitioning out of DIGGING state
Dieser Commit ist enthalten in:
Ursprung
c35b7c93fd
Commit
701d9844aa
@ -84,6 +84,10 @@ public class SnifferEntity extends AnimalEntity implements Tickable {
|
||||
|
||||
if (this.flags.contains(EntityFlag.DIGGING)) {
|
||||
digTicks = DIG_END;
|
||||
} else {
|
||||
// Handles situations where the DIGGING state is exited earlier than expected,
|
||||
// such as hitting the sniffer or joining the game while it is digging
|
||||
digTicks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +103,7 @@ public class SnifferEntity extends AnimalEntity implements Tickable {
|
||||
levelEventPacket.setType(LevelEvent.PARTICLE_DESTROY_BLOCK_NO_SOUND);
|
||||
levelEventPacket.setPosition(pos);
|
||||
levelEventPacket.setData(blockId);
|
||||
session.getUpstream().sendPacket(levelEventPacket);
|
||||
session.sendUpstreamPacket(levelEventPacket);
|
||||
|
||||
if (digTicks % 10 == 0) {
|
||||
LevelSoundEventPacket levelSoundEventPacket = new LevelSoundEventPacket();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren