3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02:00

Update AddEntityPacket to include headYaw (#3762)

Dieser Commit ist enthalten in:
Roman Alexander 2023-05-14 10:37:44 +07:00 committet von GitHub
Ursprung ea136b269c
Commit 1e79aa9b37
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -36,6 +36,7 @@ import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import net.kyori.adventure.text.Component;
import org.cloudburstmc.math.vector.Vector2f;
import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType;
@ -171,7 +172,9 @@ public class Entity implements GeyserEntity {
addEntityPacket.setUniqueEntityId(geyserId);
addEntityPacket.setPosition(position);
addEntityPacket.setMotion(motion);
addEntityPacket.setRotation(getBedrockRotation().toVector2(false)); // TODO: Check this
addEntityPacket.setRotation(Vector2f.from(pitch, yaw));
addEntityPacket.setHeadRotation(headYaw);
addEntityPacket.setBodyRotation(yaw); // TODO: This should be bodyYaw
addEntityPacket.getMetadata().putFlags(flags);
dirtyMetadata.apply(addEntityPacket.getMetadata());
addAdditionalSpawnData(addEntityPacket);