minecraft-data 2.112.0 → 2.113.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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 486,
3
+ "minecraftVersion": "1.18.11",
4
+ "majorVersion": "1.18",
5
+ "releaseType": "release"
6
+ }
@@ -61,5 +61,11 @@
61
61
  "minecraftVersion": "1.18.0",
62
62
  "majorVersion": "1.18",
63
63
  "releaseType": "release"
64
+ },
65
+ {
66
+ "version": 486,
67
+ "minecraftVersion": "1.18.11",
68
+ "majorVersion": "1.18",
69
+ "releaseType": "release"
64
70
  }
65
71
  ]
@@ -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.18.0
4
+ !version: 1.18.11
5
5
 
6
6
  # Some ProtoDef aliases
7
7
  string: ["pstring",{"countType":"varint"}] # String / array types
@@ -428,7 +428,7 @@ packet_add_player:
428
428
  user_id: li64
429
429
  links: Links
430
430
  device_id: string
431
- device_os: li32
431
+ device_os: DeviceOS
432
432
 
433
433
  packet_add_entity:
434
434
  !id: 0x0d
@@ -1279,7 +1279,12 @@ packet_level_chunk:
1279
1279
  z: zigzag32
1280
1280
  # SubChunkCount is the amount of sub chunks that are part of the chunk sent. Depending on if the cache
1281
1281
  # is enabled, a list of blob hashes will be sent, or, if disabled, the sub chunk data.
1282
+ # On newer versions, if this is a negative value it indicates to use the Subchunk Polling mechanism
1282
1283
  sub_chunk_count: varint
1284
+ # HighestSubChunk is the highest sub-chunk at the position that is not all air. It is only set if the
1285
+ # RequestMode is set to protocol.SubChunkRequestModeLimited.
1286
+ highest_subchunk_count: sub_chunk_count ?
1287
+ if -2: lu16
1283
1288
  # CacheEnabled specifies if the client blob cache should be enabled. This system is based on hashes of
1284
1289
  # blobs which are consistent and saved by the client in combination with that blob, so that the server
1285
1290
  # does not have to send the same chunk multiple times. If the client does not yet have a blob with the hash sent,
@@ -1513,6 +1518,8 @@ packet_boss_event:
1513
1518
  6: update_properties
1514
1519
  # S2C: Not implemented :( Intended to alter bar appearance, but these currently produce no effect on client-side whatsoever.
1515
1520
  7: texture
1521
+ # C2S: Client asking the server to resend all boss data.
1522
+ 8: query
1516
1523
  _: type?
1517
1524
  if show_bar:
1518
1525
  # BossBarTitle is the title shown above the boss bar. It currently does not function, and instead uses
@@ -1534,7 +1541,7 @@ packet_boss_event:
1534
1541
  # subscribed. It currently does not function. It is only set if the EventType is BossEventShow,
1535
1542
  # BossEventAppearanceProperties or BossEventTexture.
1536
1543
  overlay: varint
1537
- if register_player or unregister_player:
1544
+ if register_player or unregister_player or query:
1538
1545
  # PlayerUniqueID is the unique ID of the player that is registered to or unregistered from the boss
1539
1546
  # fight. It is set if EventType is either BossEventRegisterPlayer or BossEventUnregisterPlayer.
1540
1547
  player_id: zigzag64
@@ -3200,9 +3207,14 @@ packet_sync_entity_property:
3200
3207
  packet_add_volume_entity:
3201
3208
  !id: 0xa6
3202
3209
  !bound: client
3203
- # The Runtime Entity ID
3204
- entity_id: varint64
3210
+ # EntityRuntimeID is the runtime ID of the entity. The runtime ID is unique for each world session, and
3211
+ # entities are generally identified in packets using this runtime ID.
3212
+ runtime_id: varint64
3213
+ # EntityMetadata is a map of entity metadata, which includes flags and data properties that alter in
3214
+ # particular the way the entity looks.
3205
3215
  nbt: nbt
3216
+ json_identifier: string
3217
+ instance_name: string
3206
3218
  engine_version: string
3207
3219
 
3208
3220
  # RemoveVolumeEntity indicates a volume entity to be removed from server to client.
@@ -3271,21 +3283,45 @@ packet_photo_info_request:
3271
3283
  !id: 0xad
3272
3284
  photo_id: zigzag64
3273
3285
 
3274
- packet_subchunk:
3275
- !id: 0xae
3276
- dimension: zigzag32
3277
- x: zigzag32
3278
- y: zigzag32
3279
- z: zigzag32
3280
- # Data is the actual sub chunk data, such as the blocks.
3281
- data: ByteArray
3282
- request_result: zigzag32 =>
3286
+ SubChunkEntryWithoutCaching: []lu32
3287
+ dx: u8
3288
+ dy: u8
3289
+ dz: u8
3290
+ result: u8 =>
3291
+ 0: undefined
3292
+ 1: success
3293
+ 2: chunk_not_found
3294
+ 3: invalid_dimension
3295
+ 4: player_not_found
3296
+ 5: y_index_out_of_bounds
3297
+ 6: success_all_air
3298
+ # Payload has the terrain data, if the chunk isn't empty and caching is disabled
3299
+ payload: ByteArray
3300
+ heightmap_type: u8 =>
3301
+ 0: no_data
3302
+ 1: has_data
3303
+ 2: too_high
3304
+ 3: too_low
3305
+ heightmap: heightmap_type ?
3306
+ if has_data: '["buffer", { "count": 256 }]'
3307
+ blob_id: lu64
3308
+
3309
+ SubChunkEntryWithCaching: []lu32
3310
+ dx: u8
3311
+ dy: u8
3312
+ dz: u8
3313
+ result: u8 =>
3283
3314
  0: undefined
3284
3315
  1: success
3285
3316
  2: chunk_not_found
3286
3317
  3: invalid_dimension
3287
3318
  4: player_not_found
3288
3319
  5: y_index_out_of_bounds
3320
+ 6: success_all_air
3321
+ # Payload has the terrain data, if the chunk isn't empty and caching is disabled
3322
+ payload: result ?
3323
+ if success_all_air: void
3324
+ default: ByteArray
3289
3325
  heightmap_type: u8 =>
3290
3326
  0: no_data
3291
3327
  1: has_data
@@ -3293,13 +3329,60 @@ packet_subchunk:
3293
3329
  3: too_low
3294
3330
  heightmap: heightmap_type ?
3295
3331
  if has_data: '["buffer", { "count": 256 }]'
3332
+ blob_id: lu64
3333
+
3334
+ # SubChunk sends data about multiple sub-chunks around a center point.
3335
+ packet_subchunk:
3336
+ !id: 0xae
3296
3337
  cache_enabled: bool
3297
- blob_id: cache_enabled ?
3298
- if true: u64
3338
+ dimension: zigzag32
3339
+ # Origin point
3340
+ origin: vec3i
3341
+ entries: cache_enabled ?
3342
+ if true: SubChunkEntryWithCaching
3343
+ if false: SubChunkEntryWithoutCaching
3299
3344
 
3300
3345
  packet_subchunk_request:
3301
3346
  !id: 0xaf
3302
3347
  dimension: zigzag32
3303
- x: zigzag32
3304
- y: zigzag32
3305
- z: zigzag32
3348
+ # Origin point
3349
+ origin: vec3i
3350
+ requests: []lu32
3351
+ dx: u8
3352
+ dy: u8
3353
+ dz: u8
3354
+
3355
+ packet_client_start_item_cooldown:
3356
+ !id: 0xb0
3357
+ # ClientStartItemCooldown is sent by the client to the server to initiate a cooldown on an item. The purpose of this
3358
+ # packet isn't entirely clear.
3359
+ category: string
3360
+ # Duration is the duration of ticks the cooldown should last.
3361
+ duration: zigzag32
3362
+
3363
+ # ScriptMessage is used to communicate custom messages from the client to the server, or from the server to the client.
3364
+ # While the name may suggest this packet is used for the discontinued scripting API, it is likely instead for the
3365
+ # GameTest framework.
3366
+ packet_script_message:
3367
+ !id: 0xb1
3368
+ # Message ID is the identifier of the message, used by either party to identify the message data sent.
3369
+ message_id: string
3370
+ # Data contains the data of the message.
3371
+ data: string
3372
+
3373
+ # CodeBuilderSource is an Education Edition packet sent by the client to the server to run an operation with a
3374
+ packet_code_builder_source:
3375
+ !id: 0xb2
3376
+ # Operation is used to distinguish the operation performed. It is always one of the constants listed above.
3377
+ operation: u8 =>
3378
+ - none
3379
+ - get
3380
+ - set
3381
+ - reset
3382
+ # Category is used to distinguish the category of the operation performed. It is always one of the constants
3383
+ category: u8 =>
3384
+ - none
3385
+ - code_status
3386
+ - instantiation
3387
+ # Value contains extra data about the operation performed. It is always empty unless the operation is
3388
+ value: string
@@ -421,7 +421,11 @@ MetadataFlags2: [ "bitflags", {
421
421
  "celebrating_special",
422
422
  "unknown95", # 95
423
423
  "ram_attack",
424
- "playing_dead"
424
+ "playing_dead",
425
+ "in_ascendable_block",
426
+ "over_descendable_block",
427
+ "croaking",
428
+ "eat_mob"
425
429
  ]
426
430
  }]
427
431
 
@@ -818,6 +822,10 @@ ItemStackRequest:
818
822
  # that are not fully consumed when used for a recipe should not be destroyed there, but instead, should be
819
823
  # turned into their respective resulting items.
820
824
  - create
825
+ # (as of 1.18.10) Not currently used
826
+ - place_in_container
827
+ # (as of 1.18.10) Not currently used
828
+ - take_out_container
821
829
  # LabTableCombineStackRequestAction is sent by the client when it uses a lab table to combine item stacks.
822
830
  - lab_table_combine
823
831
  # BeaconPaymentStackRequestAction is sent by the client when it submits an item to enable effects from a
@@ -993,6 +1001,7 @@ CommandOrigin:
993
1001
  12: precompiled
994
1002
  13: game_director_entity_server # ?
995
1003
  14: script
1004
+ 15: executor
996
1005
 
997
1006
  # UUID is the UUID of the command called. This UUID is a bit odd as it is not specified by the server. It
998
1007
  # is not clear what exactly this UUID is meant to identify, but it is unique for each command called.
@@ -1658,6 +1667,16 @@ SoundType: varint =>
1658
1667
  - convert_to_stray
1659
1668
  - extinguish_candle
1660
1669
  - ambient_candle
1670
+ - sculk_catalyst_bloom
1671
+ - sculk_shrieker_shriek
1672
+ - warden_nearby_close
1673
+ - warden_nearby_closer
1674
+ - warden_nearby_closest
1675
+ - warden_slightly_angry
1676
+ - record_otherside
1677
+ - tongue
1678
+ - crack_iron_golem
1679
+ - repair_iron_golem
1661
1680
  - Undefined
1662
1681
 
1663
1682
  # TODO: remove?
@@ -1761,4 +1780,21 @@ LegacyEntityType: li32 =>
1761
1780
  110: drowned
1762
1781
  111: tropicalfish
1763
1782
  112: cod
1764
- 113: panda
1783
+ 113: panda
1784
+
1785
+ DeviceOS: li32 =>
1786
+ - Undefined
1787
+ - Android
1788
+ - IOS
1789
+ - OSX
1790
+ - FireOS
1791
+ - GearVR
1792
+ - Hololens
1793
+ - Win10
1794
+ - Win32
1795
+ - Dedicated
1796
+ - TVOS
1797
+ - Orbis
1798
+ - NintendoSwitch
1799
+ - Xbox
1800
+ - WindowsPhone
@@ -1222,9 +1222,29 @@
1222
1222
  "steve": "bedrock/1.16.201",
1223
1223
  "blocksB2J": "bedrock/1.18.0",
1224
1224
  "blocksJ2B": "bedrock/1.18.0",
1225
+ "proto": "bedrock/1.18.0",
1226
+ "types": "bedrock/1.18.0",
1227
+ "version": "bedrock/1.18.0"
1228
+ },
1229
+ "1.18.11": {
1230
+ "blocks": "bedrock/1.17.40",
1231
+ "blockStates": "bedrock/1.17.40",
1232
+ "blockCollisionShapes": "bedrock/1.17.40",
1233
+ "biomes": "bedrock/1.18.0",
1234
+ "items": "bedrock/1.18.0",
1235
+ "recipes": "bedrock/1.18.0",
1236
+ "instruments": "bedrock/1.17.0",
1237
+ "materials": "pc/1.17",
1238
+ "enchantments": "pc/1.17",
1239
+ "effects": "pc/1.17",
1240
+ "protocol": "bedrock/1.18.11",
1241
+ "windows": "bedrock/1.16.201",
1242
+ "steve": "bedrock/1.16.201",
1243
+ "blocksB2J": "bedrock/1.18.0",
1244
+ "blocksJ2B": "bedrock/1.18.0",
1225
1245
  "proto": "bedrock/latest",
1226
1246
  "types": "bedrock/latest",
1227
- "version": "bedrock/1.18.0"
1247
+ "version": "bedrock/1.18.11"
1228
1248
  }
1229
1249
  }
1230
1250
  }
@@ -1,4 +1,53 @@
1
1
  [
2
+ {
3
+ "minecraftVersion": "1.18.2-rc1",
4
+ "version": 1073741897,
5
+ "dataVersion": 2974,
6
+ "usesNetty": true,
7
+ "majorVersion": "1.18"
8
+ },
9
+ {
10
+ "minecraftVersion": "1.18.2-pre3",
11
+ "version": 1073741896,
12
+ "dataVersion": 2973,
13
+ "usesNetty": true,
14
+ "majorVersion": "1.18"
15
+ },
16
+ {
17
+ "minecraftVersion": "1.18.2-pre2",
18
+ "version": 1073741895,
19
+ "dataVersion": 2972,
20
+ "usesNetty": true,
21
+ "majorVersion": "1.18"
22
+ },
23
+ {
24
+ "minecraftVersion": "1.18.2-pre1",
25
+ "version": 1073741894,
26
+ "dataVersion": 2971,
27
+ "usesNetty": true,
28
+ "majorVersion": "1.18"
29
+ },
30
+ {
31
+ "minecraftVersion": "22w07a",
32
+ "version": 1073741892,
33
+ "dataVersion": 2969,
34
+ "usesNetty": true,
35
+ "majorVersion": "1.18"
36
+ },
37
+ {
38
+ "minecraftVersion": "22w06a",
39
+ "version": 1073741891,
40
+ "dataVersion": 2968,
41
+ "usesNetty": true,
42
+ "majorVersion": "1.18"
43
+ },
44
+ {
45
+ "minecraftVersion": "22w05a",
46
+ "version": 1073741890,
47
+ "dataVersion": 2967,
48
+ "usesNetty": true,
49
+ "majorVersion": "1.18"
50
+ },
2
51
  {
3
52
  "minecraftVersion": "22w03a",
4
53
  "version": 1073741889,
@@ -1,3 +1,12 @@
1
+ ## 2.113.2
2
+ * new release because 2.113.1 of nmd already exists
3
+
4
+ ## 2.113.1
5
+ * bedrock: Corrections to protocol data for subchunk packets
6
+
7
+ ## 2.113.0
8
+ * bedrock: add 1.18.11 protocol data
9
+
1
10
  ## 2.112.0
2
11
  * bedrock: version data parity, block state and protocol fixes
3
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minecraft-data",
3
- "version": "2.112.0",
3
+ "version": "2.113.2",
4
4
  "description": "Provide easy access to minecraft data in node.js",
5
5
  "main": "index.js",
6
6
  "tonicExampleFilename": "example.js",
package/test/load.js CHANGED
@@ -21,3 +21,26 @@ describe('load', () => {
21
21
  assert.strictEqual(firstDataVersion.isNewerOrEqualTo('15w31c'), true) // no dataVersion
22
22
  })
23
23
  })
24
+
25
+ describe('versions with block data have block state IDs', () => {
26
+ const mcData = require('minecraft-data')
27
+ const versions = require('minecraft-data').versions
28
+ let oks = 0
29
+ for (const type in versions) {
30
+ for (const version of versions[type]) {
31
+ it(type + ' ' + version.minecraftVersion, () => {
32
+ const data = mcData(type + '_' + version.minecraftVersion)
33
+ if (data?.blocks) {
34
+ for (const block of data.blocksArray) {
35
+ assert.ok(block.defaultState > -1)
36
+ oks++
37
+ }
38
+ }
39
+ })
40
+ }
41
+ }
42
+ after(() => {
43
+ console.log(oks, 'OKs')
44
+ assert(oks > 0)
45
+ })
46
+ })
@@ -60,6 +60,7 @@ export interface IndexedData {
60
60
 
61
61
  biomes: { [id: number]: Biome; };
62
62
  biomesArray: Biome[];
63
+ biomesByName: { [name: string]: Biome; };
63
64
 
64
65
  recipes: { [id: number]: Recipe[]; };
65
66