Add missing villager entity events (#3063)

This commit is contained in:
AJ Ferguson 2022-06-17 12:25:49 -04:00 committed by GitHub
parent 5b67c78785
commit 71c489b462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,6 +147,7 @@ public class JavaEntityEventTranslator extends PacketTranslator<ClientboundEntit
soundPacket.setRelativeVolumeDisabled(false); soundPacket.setRelativeVolumeDisabled(false);
session.sendUpstreamPacket(soundPacket); session.sendUpstreamPacket(soundPacket);
return; return;
case VILLAGER_MATE:
case ANIMAL_EMIT_HEARTS: case ANIMAL_EMIT_HEARTS:
entityEventPacket.setType(EntityEventType.LOVE_PARTICLES); entityEventPacket.setType(EntityEventType.LOVE_PARTICLES);
break; break;
@ -176,6 +177,18 @@ public class JavaEntityEventTranslator extends PacketTranslator<ClientboundEntit
case IRON_GOLEM_HOLD_POPPY: case IRON_GOLEM_HOLD_POPPY:
entityEventPacket.setType(EntityEventType.GOLEM_FLOWER_OFFER); entityEventPacket.setType(EntityEventType.GOLEM_FLOWER_OFFER);
break; break;
case VILLAGER_ANGRY:
entityEventPacket.setType(EntityEventType.VILLAGER_ANGRY);
break;
case VILLAGER_HAPPY:
entityEventPacket.setType(EntityEventType.VILLAGER_HAPPY);
break;
case VILLAGER_SWEAT:
LevelEventPacket levelEventPacket = new LevelEventPacket();
levelEventPacket.setType(LevelEventType.PARTICLE_SPLASH);
levelEventPacket.setPosition(entity.getPosition().up(entity.getDefinition().height()));
session.sendUpstreamPacket(levelEventPacket);
return;
case IRON_GOLEM_EMPTY_HAND: case IRON_GOLEM_EMPTY_HAND:
entityEventPacket.setType(EntityEventType.GOLEM_FLOWER_WITHDRAW); entityEventPacket.setType(EntityEventType.GOLEM_FLOWER_WITHDRAW);
break; break;