Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17.1 support #650

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions config/default-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"worldFolder":"world",
"generation": {
"name": "diamond_square",
"options":{
"options": {
"worldHeight": 80
}
},
Expand All @@ -20,10 +20,14 @@
"modpe": false,
"view-distance": 10,
"player-list-text": {
"header":{"text": "Flying squid"},
"footer":{"text": "Test server"}
"header": {
"text": "Flying squid"
},
"footer": {
"text": "Test server"
}
},
"everybody-op": false,
"max-entities":100,
"version": "1.16.5"
"max-entities": 100,
"version": "1.17.1"
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@
"dependencies": {
"change-case": "^4.1.2",
"colors": "1.4.0",
"diamond-square": "^1.2.0",
"diamond-square": "^1.5.0",
"emit-then": "^2.0.0",
"event-promise": "^0.0.1",
"exit-hook": "^2.2.1",
"flatmap": "^0.0.3",
"long": "^5.1.0",
"minecraft-protocol": "^1.44.0",
"minecraft-protocol": "^1.45.0",
"moment": "^2.10.6",
"needle": "^2.5.0",
"node-gzip": "^1.1.2",
"prismarine-chunk": "^1.34.0",
"prismarine-entity": "^2.2.0",
"prismarine-chunk": "^1.35.0",
"prismarine-entity": "^2.4.0",
"prismarine-item": "^1.14.0",
"prismarine-nbt": "^2.2.1",
"prismarine-provider-anvil": "^2.7.0",
"prismarine-nbt": "^2.5.0",
"prismarine-provider-anvil": "PrismarineJS/prismarine-provider-anvil#optional_palette_1_14",
"prismarine-registry": "^1.7.0",
"prismarine-windows": "^2.8.0",
"prismarine-world": "^3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/plugins/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports.player = async function (player, serv, settings) {
entityId: player.id,
levelType: 'default',
gameMode: player.gameMode,
previousGameMode: player.prevGameMode,
previousGameMode: registry.loginPacket?.previousGameMode ?? 0,
worldNames: Object.values(serv.dimensionNames),
dimensionCodec: registry.loginPacket?.dimensionCodec,
worldName: serv.dimensionNames[0],
Expand Down
11 changes: 9 additions & 2 deletions src/lib/plugins/world.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,20 @@ module.exports.player = function (player, serv, settings) {
type: 'compound',
name: '',
value: {
MOTION_BLOCKING: { type: 'longArray', value: new Array(36).fill([0, 0]) }
MOTION_BLOCKING: { type: 'longArray', value: new Array(37).fill([0, 0]) }
}
}, // FIXME: fake heightmap
chunkData: chunk.dump(),
blockEntities: []
})
if (registry.supportFeature('lightSentSeparately')) {
if (registry.supportFeature('dimensionDataIsAvailable')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the feature seems unrelated with the content of this if

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied directly from mineflayer code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

player._client.write('update_light', {
chunkX: x,
chunkZ: z,
trustEdges: true, // should be false when a chunk section is updated instead of the whole chunk being overwritten, do we ever do that?
...chunk.dumpLight()
})
} else if (registry.supportFeature('lightSentSeparately')) {
player._client.write('update_light', {
chunkX: x,
chunkZ: z,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const testedVersions = ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5']
const testedVersions = ['1.8.8', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.5', '1.17.1']
module.exports = {
testedVersions,
latestSupportedVersion: testedVersions[testedVersions.length - 1],
Expand Down
Loading