mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-24 17:21:43 +00:00
fix 2 bugs in login : send the update health packet + send named_entity_spawn as fixed point
This commit is contained in:
parent
37db96d8a1
commit
c26b11bb74
2 changed files with 4 additions and 4 deletions
|
|
@ -207,9 +207,9 @@ function inject(serv,player)
|
||||||
player._writeOthers('named_entity_spawn',{
|
player._writeOthers('named_entity_spawn',{
|
||||||
entityId: player.entity.id,
|
entityId: player.entity.id,
|
||||||
playerUUID: player._client.uuid,
|
playerUUID: player._client.uuid,
|
||||||
x: player.entity.position.x/32,
|
x: player.entity.position.x,
|
||||||
y: player.entity.position.y/32,
|
y: player.entity.position.y,
|
||||||
z: player.entity.position.z/32,
|
z: player.entity.position.z,
|
||||||
yaw: player.entity.yaw,
|
yaw: player.entity.yaw,
|
||||||
pitch: player.entity.pitch,
|
pitch: player.entity.pitch,
|
||||||
currentItem: 0,
|
currentItem: 0,
|
||||||
|
|
@ -240,6 +240,7 @@ function inject(serv,player)
|
||||||
await sendMap();
|
await sendMap();
|
||||||
sendSpawnPosition();
|
sendSpawnPosition();
|
||||||
sendInitialPosition();
|
sendInitialPosition();
|
||||||
|
player.updateHealth(player.entity.health);
|
||||||
|
|
||||||
player.emit("spawned");
|
player.emit("spawned");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,6 @@ function inject(serv,settings)
|
||||||
});
|
});
|
||||||
|
|
||||||
player.on('modpe', function (command) {
|
player.on('modpe', function (command) {
|
||||||
console.log(command);
|
|
||||||
try {
|
try {
|
||||||
procCmd(command);
|
procCmd(command);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue