some isspawned checks
This commit is contained in:
parent
0356f220cb
commit
5bec1fd1a1
1 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@ public class WrapperEntity implements Tickable, TrackedEntity {
|
||||||
this.ticking = true;
|
this.ticking = true;
|
||||||
this.viewers = ConcurrentHashMap.newKeySet();
|
this.viewers = ConcurrentHashMap.newKeySet();
|
||||||
this.passengers = ConcurrentHashMap.newKeySet();
|
this.passengers = ConcurrentHashMap.newKeySet();
|
||||||
|
this.location = new Location(0, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WrapperEntity(int entityId, EntityType entityType) {
|
public WrapperEntity(int entityId, EntityType entityType) {
|
||||||
|
@ -383,7 +384,7 @@ public class WrapperEntity implements Tickable, TrackedEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rotateHead(float yaw, float pitch) {
|
public void rotateHead(float yaw, float pitch) {
|
||||||
sendPacketsToViewers(
|
sendPacketsToViewersIfSpawned(
|
||||||
new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround),
|
new WrapperPlayServerEntityRotation(entityId, yaw, pitch, onGround),
|
||||||
new WrapperPlayServerEntityHeadLook(entityId, yaw)
|
new WrapperPlayServerEntityHeadLook(entityId, yaw)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue