minecraft-data 3.9.0 → 3.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +1 -6
- package/.github/workflows/md-release.yml +5 -4
- package/.github/workflows/npm-publish.yml +1 -2
- package/.github/workflows/trigger.yml +2 -2
- package/README.md +14 -15
- package/data.js +22 -1
- package/doc/api.md +460 -167
- package/doc/history.md +410 -176
- package/index.d.ts +152 -125
- package/lib/indexes.js +0 -2
- package/lib/loader.js +1 -2
- package/minecraft-data/README.md +1 -1
- package/minecraft-data/data/bedrock/1.16.201/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.201/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.16.210/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.210/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.16.220/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.16.220/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.0/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.0/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.10/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.10/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.30/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.30/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.17.40/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.17.40/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.0/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.0/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.11/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.11/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.18.30/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.18.30/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.1/proto.yml +1 -1
- package/minecraft-data/data/bedrock/1.19.1/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.10/proto.yml +3680 -0
- package/minecraft-data/data/bedrock/1.19.10/protocol.json +1 -1
- package/minecraft-data/data/bedrock/1.19.10/types.yml +1955 -0
- package/minecraft-data/data/bedrock/1.19.20/protocol.json +10644 -0
- package/minecraft-data/data/bedrock/1.19.20/version.json +6 -0
- package/minecraft-data/data/bedrock/common/protocolVersions.json +6 -0
- package/minecraft-data/data/bedrock/common/versions.json +2 -1
- package/minecraft-data/data/bedrock/latest/proto.yml +55 -7
- package/minecraft-data/data/bedrock/latest/types.yml +7 -0
- package/minecraft-data/data/dataPaths.json +22 -1
- package/minecraft-data/data/pc/1.19/protocol.json +1 -5
- package/minecraft-data/data/pc/1.7/protocol.json +1 -1
- package/minecraft-data/data/pc/1.8/protocol.json +1 -1
- package/minecraft-data/data/pc/15w40b/protocol.json +1 -1
- package/minecraft-data/data/pc/common/protocolVersions.json +35 -0
- package/minecraft-data/doc/history.md +14 -0
- package/package.json +1 -1
- package/typings/generate-typings.js +22 -14
- package/typings/index-template.d.ts +160 -133
- package/typings/test-typings.ts +24 -29
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Created from MiNET and gophertunnel docs
|
|
2
2
|
# The version below is the latest version this protocol schema was updated for.
|
|
3
3
|
# The output protocol.json will be in the folder for the version
|
|
4
|
-
!version: 1.19.
|
|
4
|
+
!version: 1.19.20
|
|
5
5
|
|
|
6
6
|
# Some ProtoDef aliases
|
|
7
7
|
string: ["pstring",{"countType":"varint"}] # String / array types
|
|
@@ -334,6 +334,10 @@ packet_start_game:
|
|
|
334
334
|
# A hack that Mojang put in place to preserve backwards compatibility with old villagers.
|
|
335
335
|
# The his never actually read though, so it has no functionality.
|
|
336
336
|
only_spawn_v1_villagers: bool
|
|
337
|
+
# PersonaDisabled is true if persona skins are disabled for the current game session.
|
|
338
|
+
persona_disabled: bool
|
|
339
|
+
# CustomSkinsDisabled is true if custom skins are disabled for the current game session.
|
|
340
|
+
custom_skins_disabled: bool
|
|
337
341
|
# The version of the game from which Vanilla features will be used.
|
|
338
342
|
# The exact function of this field isn't clear.
|
|
339
343
|
game_version: string
|
|
@@ -342,6 +346,13 @@ packet_start_game:
|
|
|
342
346
|
is_new_nether: bool
|
|
343
347
|
edu_resource_uri: EducationSharedResourceURI
|
|
344
348
|
experimental_gameplay_override: bool
|
|
349
|
+
# ChatRestrictionLevel specifies the level of restriction on in-game chat.
|
|
350
|
+
chat_restriction_level: u8 =>
|
|
351
|
+
0: none
|
|
352
|
+
1: dropped
|
|
353
|
+
2: disabled
|
|
354
|
+
# DisablePlayerInteractions is true if the client should ignore other players when interacting with the world.
|
|
355
|
+
disable_player_interactions: bool
|
|
345
356
|
# A base64 encoded world ID that is used to identify the world.
|
|
346
357
|
level_id: string
|
|
347
358
|
# The name of the world that the player is joining. Note that this field shows up
|
|
@@ -407,6 +418,9 @@ packet_start_game:
|
|
|
407
418
|
# WorldTemplateID is a UUID that identifies the template that was used to generate the world. Servers that do not
|
|
408
419
|
# use a world based off of a template can set this to an empty UUID.
|
|
409
420
|
world_template_id: uuid
|
|
421
|
+
# ClientSideGeneration is true if the client should use the features registered in the FeatureRegistry packet to
|
|
422
|
+
# generate terrain client-side to save on bandwidth.
|
|
423
|
+
client_side_generation: bool
|
|
410
424
|
|
|
411
425
|
packet_add_player:
|
|
412
426
|
!id: 0x0c
|
|
@@ -1047,7 +1061,7 @@ packet_set_entity_data:
|
|
|
1047
1061
|
!bound: both
|
|
1048
1062
|
runtime_entity_id: varint64
|
|
1049
1063
|
metadata: MetadataDictionary
|
|
1050
|
-
tick:
|
|
1064
|
+
tick: varint64
|
|
1051
1065
|
|
|
1052
1066
|
# SetActorMotion is sent by the server to change the client-side velocity of an entity. It is usually used
|
|
1053
1067
|
# in combination with server-side movement calculation.
|
|
@@ -1475,6 +1489,8 @@ packet_clientbound_map_item_data:
|
|
|
1475
1489
|
# LockedMap specifies if the map that was updated was a locked map, which may be done using a cartography
|
|
1476
1490
|
# table.
|
|
1477
1491
|
locked: bool
|
|
1492
|
+
# Origin is the center position of the map being updated.
|
|
1493
|
+
origin: BlockCoordinates
|
|
1478
1494
|
# The following fields apply only for the MapUpdateFlagInitialisation.
|
|
1479
1495
|
# MapsIncludedIn holds an array of map IDs that the map updated is included in. This has to do with the
|
|
1480
1496
|
# scale of the map: Each map holds its own map ID and all map IDs of maps that include this map and have
|
|
@@ -1519,6 +1535,11 @@ packet_map_info_request:
|
|
|
1519
1535
|
!id: 0x44
|
|
1520
1536
|
!bound: both
|
|
1521
1537
|
map_id: zigzag64
|
|
1538
|
+
# ClientPixels is a map of pixels sent from the client to notify the server about the pixels that it isn't
|
|
1539
|
+
# aware of.
|
|
1540
|
+
client_pixels: []lu32
|
|
1541
|
+
rgba: li32
|
|
1542
|
+
index: lu16
|
|
1522
1543
|
|
|
1523
1544
|
# RequestChunkRadius is sent by the client to the server to update the server on the chunk view radius that
|
|
1524
1545
|
# it has set in the settings. The server may respond with a ChunkRadiusUpdated packet with either the chunk
|
|
@@ -2226,11 +2247,21 @@ packet_modal_form_response:
|
|
|
2226
2247
|
# FormID is the form ID of the form the client has responded to. It is the same as the ID sent in the
|
|
2227
2248
|
# ModalFormRequest, and may be used to identify which form was submitted.
|
|
2228
2249
|
form_id: varint
|
|
2229
|
-
#
|
|
2230
|
-
|
|
2231
|
-
#
|
|
2232
|
-
# a
|
|
2233
|
-
|
|
2250
|
+
# HasResponseData is true if the client provided response data.
|
|
2251
|
+
has_response_data: bool
|
|
2252
|
+
# ResponseData is a JSON encoded value representing the response of the player. For a modal form, the response is
|
|
2253
|
+
# either true or false, for a menu form, the response is an integer specifying the index of the button clicked, and
|
|
2254
|
+
# for a custom form, the response is an array containing a value for each element.
|
|
2255
|
+
data: has_response_data ?
|
|
2256
|
+
if true: string
|
|
2257
|
+
# HasCancelReason is true if the client provided a reason for the form being cancelled.
|
|
2258
|
+
has_cancel_reason: bool
|
|
2259
|
+
# CancelReason represents the reason why the form was cancelled.
|
|
2260
|
+
_: has_cancel_reason ?
|
|
2261
|
+
if true:
|
|
2262
|
+
cancel_reason: u8 =>
|
|
2263
|
+
0: closed
|
|
2264
|
+
1: busy
|
|
2234
2265
|
|
|
2235
2266
|
# ServerSettingsRequest is sent by the client to request the settings specific to the server. These settings
|
|
2236
2267
|
# are shown in a separate tab client-side, and have the same structure as a custom form.
|
|
@@ -2540,6 +2571,12 @@ packet_network_chunk_publisher_update:
|
|
|
2540
2571
|
# Unlike the RequestChunkRadius and ChunkRadiusUpdated packets, this radius is in blocks rather than
|
|
2541
2572
|
# chunks, so the chunk radius needs to be multiplied by 16. (Or shifted to the left by 4.)
|
|
2542
2573
|
radius: varint
|
|
2574
|
+
saved_chunks: []lu32
|
|
2575
|
+
# ChunkX is the X coordinate of the chunk sent. (To translate a block's X to a chunk's X: x >> 4)
|
|
2576
|
+
x: zigzag32
|
|
2577
|
+
# ChunkZ is the Z coordinate of the chunk sent. (To translate a block's Z to a chunk's Z: z >> 4)
|
|
2578
|
+
z: zigzag32
|
|
2579
|
+
|
|
2543
2580
|
|
|
2544
2581
|
# BiomeDefinitionList is sent by the server to let the client know all biomes that are available and
|
|
2545
2582
|
# implemented on the server side. It is much like the AvailableActorIdentifiers packet, but instead
|
|
@@ -3678,3 +3715,14 @@ packet_editor_network:
|
|
|
3678
3715
|
!bound: client
|
|
3679
3716
|
# Payload is a network little endian compound tag holding data relevant to the editor.
|
|
3680
3717
|
payload: nbt
|
|
3718
|
+
|
|
3719
|
+
# FeatureRegistry is a packet used to notify the client about the world generation features the server is currently
|
|
3720
|
+
# using. This is used in combination with the client-side world generation system introduced in v1.19.20, allowing the
|
|
3721
|
+
# client to completely generate the chunks of the world without having to rely on the server.
|
|
3722
|
+
packet_feature_registry:
|
|
3723
|
+
!id: 0xbf
|
|
3724
|
+
!bound: client
|
|
3725
|
+
# Features is a slice of all registered world generation features.
|
|
3726
|
+
features: []varint
|
|
3727
|
+
name: string
|
|
3728
|
+
options: string
|
|
@@ -468,6 +468,13 @@ PlayerAttributes: []varint
|
|
|
468
468
|
current: lf32
|
|
469
469
|
default: lf32
|
|
470
470
|
name: string
|
|
471
|
+
modifiers: []varint
|
|
472
|
+
id: string
|
|
473
|
+
name: string
|
|
474
|
+
amount: lf32
|
|
475
|
+
operation: li32
|
|
476
|
+
operand: li32
|
|
477
|
+
serializable: bool
|
|
471
478
|
|
|
472
479
|
# UseItemTransactionData represents an inventory transaction data object sent when the client uses an item on
|
|
473
480
|
# a block. Also used in PlayerAuthoritativeInput packet
|
|
@@ -1362,9 +1362,30 @@
|
|
|
1362
1362
|
"steve": "bedrock/1.16.201",
|
|
1363
1363
|
"blocksB2J": "bedrock/1.19.1",
|
|
1364
1364
|
"blocksJ2B": "bedrock/1.19.1",
|
|
1365
|
+
"proto": "bedrock/1.19.10",
|
|
1366
|
+
"types": "bedrock/1.19.10",
|
|
1367
|
+
"version": "bedrock/1.19.10"
|
|
1368
|
+
},
|
|
1369
|
+
"1.19.20": {
|
|
1370
|
+
"blocks": "bedrock/1.19.1",
|
|
1371
|
+
"blockStates": "bedrock/1.19.1",
|
|
1372
|
+
"blockCollisionShapes": "bedrock/1.19.1",
|
|
1373
|
+
"biomes": "bedrock/1.19.1",
|
|
1374
|
+
"entities": "bedrock/1.19.1",
|
|
1375
|
+
"items": "bedrock/1.19.10",
|
|
1376
|
+
"recipes": "bedrock/1.19.10",
|
|
1377
|
+
"instruments": "bedrock/1.17.0",
|
|
1378
|
+
"materials": "pc/1.17",
|
|
1379
|
+
"enchantments": "pc/1.17",
|
|
1380
|
+
"effects": "pc/1.17",
|
|
1381
|
+
"protocol": "bedrock/1.19.20",
|
|
1382
|
+
"windows": "bedrock/1.16.201",
|
|
1383
|
+
"steve": "bedrock/1.16.201",
|
|
1384
|
+
"blocksB2J": "bedrock/1.19.1",
|
|
1385
|
+
"blocksJ2B": "bedrock/1.19.1",
|
|
1365
1386
|
"proto": "bedrock/latest",
|
|
1366
1387
|
"types": "bedrock/latest",
|
|
1367
|
-
"version": "bedrock/1.19.
|
|
1388
|
+
"version": "bedrock/1.19.20"
|
|
1368
1389
|
}
|
|
1369
1390
|
}
|
|
1370
1391
|
}
|
|
@@ -2819,10 +2819,6 @@
|
|
|
2819
2819
|
"name": "locked",
|
|
2820
2820
|
"type": "bool"
|
|
2821
2821
|
},
|
|
2822
|
-
{
|
|
2823
|
-
"name": "trackingPosition",
|
|
2824
|
-
"type": "bool"
|
|
2825
|
-
},
|
|
2826
2822
|
{
|
|
2827
2823
|
"name": "icons",
|
|
2828
2824
|
"type": [
|
|
@@ -3578,7 +3574,7 @@
|
|
|
3578
3574
|
[
|
|
3579
3575
|
{
|
|
3580
3576
|
"name": "dimension",
|
|
3581
|
-
"type": "
|
|
3577
|
+
"type": "string"
|
|
3582
3578
|
},
|
|
3583
3579
|
{
|
|
3584
3580
|
"name": "worldName",
|
|
@@ -1,4 +1,39 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"minecraftVersion": "1.19.2",
|
|
4
|
+
"version": 760,
|
|
5
|
+
"dataVersion": 3120,
|
|
6
|
+
"usesNetty": true,
|
|
7
|
+
"majorVersion": "1.19"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"minecraftVersion": "1.19.2-rc2",
|
|
11
|
+
"version": 1073741927,
|
|
12
|
+
"dataVersion": 3119,
|
|
13
|
+
"usesNetty": true,
|
|
14
|
+
"majorVersion": "1.19"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"minecraftVersion": "1.19.2-rc1",
|
|
18
|
+
"version": 1073741926,
|
|
19
|
+
"dataVersion": 3118,
|
|
20
|
+
"usesNetty": true,
|
|
21
|
+
"majorVersion": "1.19"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"minecraftVersion": "1.19.1",
|
|
25
|
+
"version": 760,
|
|
26
|
+
"dataVersion": 3117,
|
|
27
|
+
"usesNetty": true,
|
|
28
|
+
"majorVersion": "1.19"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"minecraftVersion": "1.19.1-rc3",
|
|
32
|
+
"version": 1073741925,
|
|
33
|
+
"dataVersion": 3116,
|
|
34
|
+
"usesNetty": true,
|
|
35
|
+
"majorVersion": "1.19"
|
|
36
|
+
},
|
|
2
37
|
{
|
|
3
38
|
"minecraftVersion": "1.19.1-rc2",
|
|
4
39
|
"version": 1073741924,
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
## 3.10.2
|
|
2
|
+
* bedrock: fix 1.19.20 map data packet
|
|
3
|
+
|
|
4
|
+
## 3.10.1
|
|
5
|
+
* node-minecraft-data release
|
|
6
|
+
|
|
7
|
+
## 3.10.0
|
|
8
|
+
* bedrock: add protocol data for 1.19.20 (@stevarino)
|
|
9
|
+
|
|
10
|
+
## 3.9.1
|
|
11
|
+
|
|
12
|
+
* pc: fix packet_respawn (@rob9315)
|
|
13
|
+
|
|
1
14
|
## 3.9.0
|
|
15
|
+
|
|
2
16
|
* bedrock: Add bedrock 1.19 data (#600)
|
|
3
17
|
* bedrock: protocol corrections
|
|
4
18
|
* pc: Add 1.19.1-rc2 to protocol versions
|
package/package.json
CHANGED
|
@@ -5,29 +5,37 @@ const fs = require('fs')
|
|
|
5
5
|
const templateTypings = fs.readFileSync(path.resolve(__dirname, './index-template.d.ts'), 'utf8')
|
|
6
6
|
|
|
7
7
|
// Recursively get path of all files in a directory
|
|
8
|
-
function walkSync (dir,
|
|
8
|
+
function walkSync (dir, fileList = []) {
|
|
9
9
|
const files = fs.readdirSync(dir)
|
|
10
|
-
files.forEach(
|
|
10
|
+
files.forEach((file) => {
|
|
11
11
|
if (fs.statSync(path.join(dir, file)).isDirectory()) {
|
|
12
|
-
|
|
12
|
+
fileList = walkSync(path.join(dir, file), fileList)
|
|
13
13
|
} else {
|
|
14
|
-
|
|
14
|
+
fileList.push(path.join(dir, file))
|
|
15
15
|
}
|
|
16
16
|
})
|
|
17
|
-
return
|
|
17
|
+
return fileList
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async function generate () {
|
|
21
21
|
let typingString = 'declare namespace MinecraftData {\n\n'
|
|
22
|
-
typingString += (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
typingString += (
|
|
23
|
+
await Promise.all(
|
|
24
|
+
walkSync(path.resolve(__dirname, '../minecraft-data/schemas')).map(async (schemaPath) => {
|
|
25
|
+
if (schemaPath.includes('protocol_types')) return
|
|
26
|
+
return (await compileFromFile(schemaPath, { bannerComment: '' })).replace(/export /g, '')
|
|
27
|
+
})
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
.join('\n\n')
|
|
31
|
+
.split('\n')
|
|
32
|
+
.map((line) => ' ' + line)
|
|
33
|
+
.join('\n')
|
|
29
34
|
|
|
30
|
-
typingString += templateTypings
|
|
35
|
+
typingString += templateTypings
|
|
36
|
+
.split('\n')
|
|
37
|
+
.map((line) => ' ' + line)
|
|
38
|
+
.join('\n')
|
|
31
39
|
typingString += '\n}\n\n' // Close namespace
|
|
32
40
|
typingString += 'declare function MinecraftData(version: string | number): MinecraftData.IndexedData;\n'
|
|
33
41
|
typingString += 'export = MinecraftData'
|
|
@@ -37,4 +45,4 @@ async function generate () {
|
|
|
37
45
|
|
|
38
46
|
generate()
|
|
39
47
|
.then(() => console.log('Generated index.d.ts'))
|
|
40
|
-
.catch(
|
|
48
|
+
.catch((err) => console.error(err.stack))
|