Skip to content

Commit

Permalink
feat: noInitialChunksSend
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Sep 6, 2024
1 parent 3cf3c7b commit 9dccf8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/lib/modules/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,11 @@ export const player = async function (player: Player, serv: Server, settings: Op
player.sendAbilities()
sendWorldInfo()

const distance = settings['view-distance']
player.setLoadingStatus(`Getting initial chunks (distance = ${distance})`)
await player.sendMap()
if (!settings.noInitialChunksSend) {
const distance = settings['view-distance']
player.setLoadingStatus(`Getting initial chunks (distance = ${distance})`)
await player.sendMap()
}
player.setLoadingStatus(null)
player.setXp(player.xp)
updateInventory()
Expand Down
1 change: 1 addition & 0 deletions src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ declare global {
levelName?: string
motd?: string
port?: number
noInitialChunksSend?: boolean
"max-players"?: number
"online-mode"?: boolean
logging?: boolean
Expand Down

0 comments on commit 9dccf8f

Please sign in to comment.