From cfa690efb36c86d98c94d2f11d8462669cc313ce Mon Sep 17 00:00:00 2001 From: DemiPixel Date: Tue, 13 Oct 2015 23:17:01 -0700 Subject: [PATCH] Change serv.world to serv.worlds. Added playerPlugins/world.js and moved a lot of stuff from login.js there. Generating multiple worlds works and moving players there works as well. A few issues here and there. --- src/lib/playerPlugins/chest.js | 1 - src/lib/playerPlugins/login.js | 19 +++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/lib/playerPlugins/chest.js b/src/lib/playerPlugins/chest.js index 4c104aa..e0f0d9a 100644 --- a/src/lib/playerPlugins/chest.js +++ b/src/lib/playerPlugins/chest.js @@ -10,7 +10,6 @@ function inject(serv, player) try { var id = await player.world.getBlockType(referencePosition); var blockAbove = await player.world.getBlockType(referencePosition.clone().add(new vec3(0, 1, 0))); - if (id == 54) { if (blockAbove) { return; diff --git a/src/lib/playerPlugins/login.js b/src/lib/playerPlugins/login.js index e02f277..77de7cd 100644 --- a/src/lib/playerPlugins/login.js +++ b/src/lib/playerPlugins/login.js @@ -98,15 +98,15 @@ function inject(serv,player) function fillTabList() { player._writeOthers('player_info',{ - action: 0, - data: [{ - UUID: player._client.uuid, - name: player.username, - properties: [], - gamemode: player.gameMode, - ping: 1 - }] - }); + action: 0, + data: [{ + UUID: player._client.uuid, + name: player.username, + properties: [], + gamemode: player.gameMode, + ping: 1 + }] + }); player._client.write('player_info', { action: 0, @@ -118,7 +118,6 @@ function inject(serv,player) ping: 1 })) }); - } function announceJoin()