some isspawned checks

This commit is contained in:
Tofaa 2024-08-10 18:57:41 +04:00
parent 0356f220cb
commit 5bec1fd1a1

View file

@ -45,6 +45,7 @@ public class WrapperEntity implements Tickable, TrackedEntity {
this.ticking = true;
this.viewers = ConcurrentHashMap.newKeySet();
this.passengers = ConcurrentHashMap.newKeySet();
this.location = new Location(0, 0, 0, 0, 0);
}
public WrapperEntity(int entityId, EntityType entityType) {
@ -383,7 +384,7 @@ public class WrapperEntity implements Tickable, TrackedEntity {
}
public void rotateHead(float yaw, float pitch) {
sendPacketsToViewers(
sendPacketsToViewersIfSpawned(
new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround),
new WrapperPlayServerEntityHeadLook(entityId, yaw)
);