Send The Player Position After The Chunk Data

The players position was sent before sending the chunk which had now been switched.
This commit is contained in:
Oscar Beaumont 2017-11-09 10:28:33 +08:00 committed by GitHub
parent a70eee40c8
commit 39b2fc2157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,14 +28,6 @@ server.on('login', function(client) {
maxPlayers: server.maxPlayers,
reducedDebugInfo: false
});
client.write('position', {
x: 15,
y: 101,
z: 15,
yaw: 137,
pitch: 0,
flags: 0x00
});
client.write('map_chunk', {
x: 0,
z: 0,
@ -44,4 +36,12 @@ server.on('login', function(client) {
chunkData: chunk.dump(),
blockEntities: []
});
client.write('position', {
x: 15,
y: 101,
z: 15,
yaw: 137,
pitch: 0,
flags: 0x00
});
});