3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00

Add entity event for drowning. (#588)

This commit translates Java's LIVING_DROWN entity status to Bedrock's HURT_ANIMATION.
Dieser Commit ist enthalten in:
Camotoy 2020-05-18 23:26:27 -04:00 committet von GitHub
Ursprung fc5230c248
Commit fd36930502
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -49,6 +49,8 @@ public class JavaEntityStatusTranslator extends PacketTranslator<ServerEntitySta
EntityEventPacket entityEventPacket = new EntityEventPacket(); EntityEventPacket entityEventPacket = new EntityEventPacket();
entityEventPacket.setRuntimeEntityId(entity.getGeyserId()); entityEventPacket.setRuntimeEntityId(entity.getGeyserId());
switch (packet.getStatus()) { switch (packet.getStatus()) {
case LIVING_DROWN:
entityEventPacket.setData(9);
case LIVING_HURT: case LIVING_HURT:
case LIVING_HURT_SWEET_BERRY_BUSH: case LIVING_HURT_SWEET_BERRY_BUSH:
entityEventPacket.setType(EntityEventType.HURT_ANIMATION); entityEventPacket.setType(EntityEventType.HURT_ANIMATION);