Several fixes

* fix login sequence : fix spawn position
* fix gamemode != 0 : should not remove items from inventory
* update pworld and pprovider-anvil
This commit is contained in:
Romain Beaumont 2018-05-27 13:50:27 +02:00
parent f0cdc3bc23
commit d127704022
No known key found for this signature in database
GPG key ID: DB60E388B3BCF286
4 changed files with 6 additions and 5 deletions

View file

@ -35,9 +35,9 @@
"prismarine-chunk": "^1.9.0", "prismarine-chunk": "^1.9.0",
"prismarine-entity": "^0.2.0", "prismarine-entity": "^0.2.0",
"prismarine-item": "^1.0.1", "prismarine-item": "^1.0.1",
"prismarine-provider-anvil": "^2.0.0", "prismarine-provider-anvil": "^2.1.0",
"prismarine-windows": "^1.0.1", "prismarine-windows": "^1.0.1",
"prismarine-world": "^2.0.0", "prismarine-world": "^2.1.0",
"random-seed": "^0.3.0", "random-seed": "^0.3.0",
"range": "^0.0.3", "range": "^0.0.3",
"request": "^2.83.0", "request": "^2.83.0",

View file

@ -152,11 +152,11 @@ module.exports.player = function (player, serv, settings) {
addPlayer() addPlayer()
await player.findSpawnPoint() await player.findSpawnPoint()
sendLogin() sendLogin()
await player.sendMap()
player.sendSpawnPosition() player.sendSpawnPosition()
player.sendSelfPosition() player.sendSelfPosition()
player.updateHealth(player.health)
player.sendAbilities() player.sendAbilities()
await player.sendMap()
player.updateHealth(player.health)
updateTime() updateTime()
fillTabList() fillTabList()

View file

@ -35,7 +35,7 @@ module.exports.player = function (player, serv, {version}) {
}) })
} }
player.inventory.slots[36 + player.heldItemSlot]-- if (player.gameMode === 0) { player.inventory.slots[36 + player.heldItemSlot]-- }
if (heldItem.type !== 323) { if (heldItem.type !== 323) {
player.changeBlock(position, id, damage) player.changeBlock(position, id, damage)

View file

@ -160,6 +160,7 @@ module.exports.player = function (player, serv, options) {
velocity: Vec3((Math.random() - 0.5) * 10, Math.random() * 10 + 10, (Math.random() - 0.5) * 10) velocity: Vec3((Math.random() - 0.5) * 10, Math.random() * 10 + 10, (Math.random() - 0.5) * 10)
}) })
} }
return entity
}) })
.reduce((prec, entity) => { .reduce((prec, entity) => {
if (prec !== null) { prec.attach(entity) } if (prec !== null) { prec.attach(entity) }