Skip to content

Commit

Permalink
some isspawned checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofaa2 committed Aug 10, 2024
1 parent 0356f22 commit 5bec1fd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public WrapperEntity(int entityId, UUID uuid, EntityType entityType, EntityMeta
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) {
Expand Down Expand Up @@ -383,7 +384,7 @@ public boolean hasVelocity() {
}

public void rotateHead(float yaw, float pitch) {
sendPacketsToViewers(
sendPacketsToViewersIfSpawned(
new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround),
new WrapperPlayServerEntityHeadLook(entityId, yaw)
);
Expand Down

0 comments on commit 5bec1fd

Please sign in to comment.