9
0
mirror of https://github.com/GeyserExtensionists/GeyserUtils.git synced 2025-12-19 15:09:24 +00:00

Fix direction

This commit is contained in:
zimzaza4
2025-07-02 12:45:19 +08:00
parent 96232d44b7
commit 54c1637fed

View File

@@ -117,6 +117,11 @@ public class JavaAddEntityTranslatorReplace extends PacketTranslator<Clientbound
} else { } else {
entity = definition.factory().create(session, packet.getEntityId(), session.getEntityCache().getNextEntityId().incrementAndGet(), entity = definition.factory().create(session, packet.getEntityId(), session.getEntityCache().getNextEntityId().incrementAndGet(),
packet.getUuid(), definition, position, motion, yaw, pitch, headYaw); packet.getUuid(), definition, position, motion, yaw, pitch, headYaw);
// This is done over entity metadata in modern versions, but is still sent over network in the spawn packet
if (entity instanceof HangingEntity hanging) {
hanging.setDirection((Direction) packet.getData());
}
} }
if (packet.getType() == EntityType.WARDEN) { if (packet.getType() == EntityType.WARDEN) {