Skip to content

Commit e9a856e

Browse files
committed
Dimension change 'Loading terrain...'
1 parent b622494 commit e9a856e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/scripts/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ class Game {
4141
async init () {
4242
await this.al.init()
4343
await Setup(this)
44-
this.socket.on('login', () => {
45-
$('.loadingText').text('Wait. Loading terrain...')
46-
})
4744
this.socket.on('blockUpdate', (block) => {
4845
this.world.setBlock(block[0], block[1] + 16, block[2], block[3])
4946
})
@@ -66,6 +63,8 @@ class Game {
6663
this.distanceBasedFog.color.y = bg[1]
6764
this.distanceBasedFog.color.z = bg[2]
6865
this.distanceBasedFog.color.w = 1
66+
$('.initLoading').css('display', 'block')
67+
$('.loadingText').html('Loading terrain...')
6968
})
7069
this.socket.on('mapChunk', (sections, x, z) => {
7170
this.world.computeSections(sections, x, z)

src/scripts/proxy/Proxy.worker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ addEventListener('message', function (e) {
6969

7070
emit('msg', convert.toHtml(message))
7171
})
72+
bot.on('death', () => {
73+
emit('death')
74+
})
7275
bot.on('experience', function () {
7376
emit('xp', bot.experience)
7477
})

0 commit comments

Comments
 (0)