Merge remote-tracking branch 'upstream/master' into feature/blocky

This commit is contained in:
Joshua Castle 2023-05-13 22:20:17 -07:00
commit e4b12577b5
No known key found for this signature in database
GPG key ID: F674F38216C35D5D

View file

@ -36,6 +36,7 @@ import lombok.AccessLevel;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
import org.cloudburstmc.math.vector.Vector2f;
import org.cloudburstmc.math.vector.Vector3f; import org.cloudburstmc.math.vector.Vector3f;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes; import org.cloudburstmc.protocol.bedrock.data.entity.EntityDataTypes;
import org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType; import org.cloudburstmc.protocol.bedrock.data.entity.EntityEventType;
@ -171,7 +172,9 @@ public class Entity implements GeyserEntity {
addEntityPacket.setUniqueEntityId(geyserId); addEntityPacket.setUniqueEntityId(geyserId);
addEntityPacket.setPosition(position); addEntityPacket.setPosition(position);
addEntityPacket.setMotion(motion); 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); addEntityPacket.getMetadata().putFlags(flags);
dirtyMetadata.apply(addEntityPacket.getMetadata()); dirtyMetadata.apply(addEntityPacket.getMetadata());
addAdditionalSpawnData(addEntityPacket); addAdditionalSpawnData(addEntityPacket);