mcbe-leveldb 1.15.0-jsonly → 1.16.0-jsonly

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/Changelog.md CHANGED
@@ -1,3 +1,55 @@
1
+ # v1.16.0
2
+
3
+ ## Additions
4
+
5
+ - Added a custom serializer and parser for the `BiomeState` content type.
6
+ - Added the `BiomeState` NBT schema.
7
+ - Added a custom serializer and parser for the `BorderBlocks` content type.
8
+ - Added the `BorderBlocks` NBT schema.
9
+ - Added a custom serializer and parser for the `HardcodedSpawners` content type.
10
+ - Added the `HardcodedSpawners` NBT schema.
11
+ - Added a custom serializer and parser for the `AABBVolumes` content type.
12
+ - Added the `AABBVolumes` NBT schema.
13
+ - Added the format type for the following content types:
14
+ - `GeneratedPreCavesAndCliffsBlending`
15
+ - `MetaDataHash`
16
+ - `ActorDigestVersion`
17
+ - Added default values for the following content types:
18
+ - `GeneratedPreCavesAndCliffsBlending`
19
+ - `MetaDataHash`
20
+ - `ActorDigestVersion`
21
+ - Documented the possible values for the following content types:
22
+ - `Version`
23
+ - `LegacyVersion`
24
+ - `FinalizedState`
25
+ - `GeneratedPreCavesAndCliffsBlending`
26
+ - `ActorDigestVersion`
27
+ - Added/Updated documentation for several content types.
28
+ - Added enum descriptions to the `version` fields of the versioned `SubChunkPrefix` NBT schemas.
29
+ - Added the following properties to the `experiments` property of the `LevelDat` NBT schema:
30
+ - `data_driven_items`
31
+ - `data_driven_vanilla_blocks_and_items`
32
+ - `experimental_molang_features`
33
+ - `next_major_update`
34
+ - `vanilla_experiments`
35
+ - Added the following properties to the `LevelDat` NBT schema:
36
+ - `allowAnonymousBlockDropsInEditorWorlds`
37
+ - `cheatsEnabled`
38
+ - `daylightCycle`
39
+ - `PlayerHasDied`
40
+ - `permissionsLevel`
41
+ - `playerPermissionsLevel`
42
+ - `playerssleepingpercentage`
43
+ - `playerwaypoints`
44
+ - `serverEditorConnectionPolicy`
45
+ - `WorldVersion`
46
+
47
+ ## Fixes
48
+
49
+ - Fixed a typo where the `doentitydrops` property of the `LevelDat` NBT schema was incorrectly named `doentitiydrops`.
50
+ - Many fixes for the NBT schema to JSON schema converter.
51
+ - Fixes for the NBT schema to TypeScript interface converter.
52
+
1
53
  # v1.15.0
2
54
 
3
55
  ## Additions
package/LevelUtils.d.ts CHANGED
@@ -160,9 +160,34 @@ export declare const entryContentTypeToFormatMap: {
160
160
  /**
161
161
  * The version of a chunk.
162
162
  *
163
- * The current chunk version as of `v1.21.111` is `41` (`0x29`).
164
- *
165
163
  * Deleting think key causes the game to completely regenerate the corresponding chunk.
164
+ *
165
+ * Possible values:
166
+ * - `20`: v1.16.100.52
167
+ * - `21`: v1.16.100.57
168
+ * - `22`: v1.16.210
169
+ * - `23`: v1.16.220.50 (+Caves & Cliffs Experimental Toggle)
170
+ * - `24`: v1.16.220.50 (+Caves & Cliffs Experimental Toggle) (internal/developer builds)
171
+ * - `25`: v1.16.230.50 (+Caves & Cliffs Experimental Toggle)
172
+ * - `26`: v1.16.230.50 (+Caves & Cliffs Experimental Toggle) (internal/developer builds)
173
+ * - `27`: v1.17.30.23 (+Caves & Cliffs Experimental Toggle)
174
+ * - `28`: v1.17.30.23 (+Caves & Cliffs Experimental Toggle) (internal/developer builds)
175
+ * - `29`: v1.17.30.25 (+Caves & Cliffs Experimental Toggle)
176
+ * - `30`: v1.17.30.25 (+Caves & Cliffs Experimental Toggle) (internal/developer builds)
177
+ * - `31`: v1.17.40.20 (+Caves & Cliffs Experimental Toggle)
178
+ * - `32`: v1.17.40.20 (+Caves & Cliffs Experimental Toggle) (internal/developer builds)
179
+ * - `33`: v1.18.0.20
180
+ * - `34`: v1.18.0.20 (internal/developer builds)
181
+ * - `35`: v1.18.0.22
182
+ * - `36`: v1.18.0.22 (internal/developer builds)
183
+ * - `37`: v1.18.0.24
184
+ * - `38`: v1.18.0.24 (internal/developer builds)
185
+ * - `39`: v1.18.0.25
186
+ * - `40`: v1.18.30 after upgrading entities to independent storage
187
+ * - `41`: v1.21.40
188
+ * - `42`: v1.21.120
189
+ *
190
+ * @since v1.16.100
166
191
  */
167
192
  readonly Version: {
168
193
  /**
@@ -474,6 +499,10 @@ export declare const entryContentTypeToFormatMap: {
474
499
  *
475
500
  * @todo Figure out how to parse this.
476
501
  * @todo Add a description for this.
502
+ *
503
+ * @see https://github.com/yechentide/core-bedrock/blob/77d815439da14b3d0b7d0335b80deb1860aee42a/Analysis/chunk-0x34-legacy-block-extra-data.md
504
+ * @see https://github.com/robofinch/Prismarine-Anchor/blob/main/crates/bedrock/leveldb-entries/src/entries/legacy_extra_block_data.rs
505
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L331
477
506
  */
478
507
  readonly LegacyBlockExtraData: {
479
508
  /**
@@ -482,24 +511,71 @@ export declare const entryContentTypeToFormatMap: {
482
511
  readonly type: "unknown";
483
512
  };
484
513
  /**
485
- * @todo Figure out how to parse this.
514
+ * @todo Figure out what this is used for.
486
515
  * @todo Add a description for this.
516
+ *
517
+ * @see {@link NBTSchemas.nbtSchemas.BiomeState}
518
+ *
519
+ * @description
520
+ * https://github.com/robofinch/Prismarine-Anchor/blob/6ce90fa2a27c5d81e6cc1cc376e91c757a80e321/crates/bedrock/leveldb-entries/src/entries/biome_state.rs#L103C1-L109C41
521
+ *
522
+ * The above source says the following:
523
+ *
524
+ * > These state values seem to have something to do with snow accumulation level.
525
+ * Maybe the maximum level that snow can accumulate to naturally.
526
+ *
527
+ * > TODO: determine this
528
+ *
529
+ * > Also, note that these could be backed by HashMaps,
530
+ *
531
+ * > but the order of real game data is inconsistent, and have very, very few values.
532
+ *
533
+ * > This makes things easier for testing to be able to round-trip,
534
+ * and is probably more performant, too.
487
535
  */
488
536
  readonly BiomeState: {
489
537
  /**
490
538
  * The format type of the data.
491
539
  */
492
- readonly type: "unknown";
540
+ readonly type: "custom";
541
+ /**
542
+ * The format type that results from the {@link entryContentTypeToFormatMap.BiomeState.parse | parse} method.
543
+ */
544
+ readonly resultType: "JSONNBT";
545
+ /**
546
+ * The function to parse the data.
547
+ *
548
+ * The {@link data} parameter should be the buffer read directly from the file or LevelDB entry.
549
+ *
550
+ * @param data The data to parse, as a buffer.
551
+ * @returns The parsed data.
552
+ *
553
+ * @throws {RangeError} If the buffer is empty.
554
+ * @throws {RangeError} If the number of BiomeState entries does is less than the number indicated in buffer.
555
+ * @throws {RangeError} If one of the BiomeState entries does not contain enough bytes.
556
+ * @throws {TypeError} If the BiomeState format is unknown.
557
+ */
558
+ readonly parse: (data: Buffer) => NBTSchemas.NBTSchemaTypes.BiomeState;
559
+ /**
560
+ * The function to serialize the data.
561
+ *
562
+ * This result of this can be written directly to the file or LevelDB entry.
563
+ *
564
+ * @param data The data to serialize.
565
+ * @returns The serialized data, as a buffer.
566
+ *
567
+ * @throws {TypeError} If one of the BiomeState entries are undefined.
568
+ * @throws {TypeError} If the BiomeState format is unknown.
569
+ */
570
+ readonly serialize: (data: NBTSchemas.NBTSchemaTypes.BiomeState) => Buffer<ArrayBuffer>;
493
571
  };
494
572
  /**
495
573
  * A value that indicates the finalization state of a chunk's data.
496
574
  *
497
575
  * Possible values:
498
- * - `0`: Unknown
499
- * - `1`: Unknown
500
- * - `2`: Unknown
501
- *
502
- * @todo Figure out the meanings of the values.
576
+ * - `0`: NeedsInstaticking - Chunk needs to be ticked
577
+ * - `1`: NeedsPopulation - Chunk needs to be populated with mobs
578
+ * - `2`: Done - Chunk generation is fully complete
503
579
  */
504
580
  readonly FinalizedState: {
505
581
  /**
@@ -533,6 +609,9 @@ export declare const entryContentTypeToFormatMap: {
533
609
  *
534
610
  * @todo Figure out how to parse this.
535
611
  * @todo Add a description for this.
612
+ *
613
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L382
614
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L1445
536
615
  */
537
616
  readonly ConversionData: {
538
617
  /**
@@ -541,27 +620,80 @@ export declare const entryContentTypeToFormatMap: {
541
620
  readonly type: "unknown";
542
621
  };
543
622
  /**
544
- * @todo Figure out how to parse this.
545
- * @todo Add a description for this.
623
+ * The border block data for the chunk.
624
+ *
625
+ * @todo Add a better description for this.
546
626
  */
547
627
  readonly BorderBlocks: {
548
628
  /**
549
629
  * The format type of the data.
550
630
  */
551
- readonly type: "unknown";
631
+ readonly type: "custom";
632
+ /**
633
+ * The format type that results from the {@link entryContentTypeToFormatMap.BorderBlocks.parse | parse} method.
634
+ */
635
+ readonly resultType: "JSONNBT";
636
+ /**
637
+ * The function to parse the data.
638
+ *
639
+ * The {@link data} parameter should be the buffer read directly from the file or LevelDB entry.
640
+ *
641
+ * @param data The data to parse, as a buffer.
642
+ * @returns The parsed data.
643
+ *
644
+ * @throws {RangeError} If the buffer is empty.
645
+ * @throws {RangeError} If the length of the buffer is not equal to the expected length based on the first byte.
646
+ */
647
+ readonly parse: (data: Buffer) => NBTSchemas.NBTSchemaTypes.BorderBlocks;
648
+ /**
649
+ * The function to serialize the data.
650
+ *
651
+ * This result of this can be written directly to the file or LevelDB entry.
652
+ *
653
+ * @param data The data to serialize.
654
+ * @returns The serialized data, as a buffer.
655
+ *
656
+ * @throws {TypeError} If one of the BorderBlocks entries are undefined.
657
+ */
658
+ readonly serialize: (data: NBTSchemas.NBTSchemaTypes.BorderBlocks) => Buffer<ArrayBuffer>;
552
659
  };
553
660
  /**
554
661
  * Bounding boxes for structure spawns, such as a Nether Fortress or Pillager Outpost.
555
662
  *
556
- * @deprecated Replaced with {@link AABBVolumes} in either 1.21.120 or one of the 1.21.120 previews.
557
- *
558
- * @todo Figure out how to parse this.
663
+ * @deprecated Replaced with {@link entryContentTypeToFormatMap.AABBVolumes | AABBVolumes} in either 1.21.10 or one of the 1.21.10 previews.
559
664
  */
560
665
  readonly HardcodedSpawners: {
561
666
  /**
562
667
  * The format type of the data.
563
668
  */
564
- readonly type: "unknown";
669
+ readonly type: "custom";
670
+ /**
671
+ * The format type that results from the {@link entryContentTypeToFormatMap.HardcodedSpawners.parse | parse} method.
672
+ */
673
+ readonly resultType: "JSONNBT";
674
+ /**
675
+ * The function to parse the data.
676
+ *
677
+ * The {@link data} parameter should be the buffer read directly from the file or LevelDB entry.
678
+ *
679
+ * @param data The data to parse, as a buffer.
680
+ * @returns The parsed data.
681
+ *
682
+ * @throws {RangeError} If the buffer is less than 4 bytes.
683
+ * @throws {RangeError} If the length of the buffer is not equal to the expected length based on the first four bytes.
684
+ */
685
+ readonly parse: (data: Buffer) => NBTSchemas.NBTSchemaTypes.HardcodedSpawners;
686
+ /**
687
+ * The function to serialize the data.
688
+ *
689
+ * This result of this can be written directly to the file or LevelDB entry.
690
+ *
691
+ * @param data The data to serialize.
692
+ * @returns The serialized data, as a buffer.
693
+ *
694
+ * @throws {TypeError} If one of the HardcodedSpawners entries are undefined.
695
+ */
696
+ readonly serialize: (data: NBTSchemas.NBTSchemaTypes.HardcodedSpawners) => Buffer<ArrayBuffer>;
565
697
  };
566
698
  /**
567
699
  * @see {@link NBTSchemas.nbtSchemas.RandomTicks}
@@ -619,20 +751,53 @@ export declare const entryContentTypeToFormatMap: {
619
751
  readonly type: "unknown";
620
752
  };
621
753
  /**
622
- * @deprecated Unused.
754
+ * UNDOCUMENTED.
623
755
  *
624
- * @todo Figure out how to parse this.
756
+ * Possible values:
757
+ * - `0`: False
758
+ * - `1`: True
759
+ *
760
+ * @todo Try to get a world with this to see how it works.
625
761
  * @todo Add a description for this.
762
+ *
763
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext?plain=1#L481
764
+ *
765
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L1470
766
+ * One of the sources seem to indicate this was added in 1.17.30.25. (Verify this, then add the \@since tag.)
626
767
  */
627
768
  readonly GeneratedPreCavesAndCliffsBlending: {
628
769
  /**
629
770
  * The format type of the data.
630
771
  */
631
- readonly type: "unknown";
772
+ readonly type: "int";
773
+ /**
774
+ * How many bytes this integer is.
775
+ */
776
+ readonly bytes: 1;
777
+ /**
778
+ * The endianness of the data.
779
+ */
780
+ readonly format: "LE";
781
+ /**
782
+ * The signedness of the data.
783
+ */
784
+ readonly signed: false;
785
+ /**
786
+ * The default value to use when initializing a new entry.
787
+ *
788
+ * Bytes:
789
+ * ```json
790
+ * [0]
791
+ * ```
792
+ */
793
+ readonly defaultValue: Buffer<ArrayBuffer>;
632
794
  };
633
795
  /**
634
796
  * @todo Figure out how to parse this.
635
797
  * @todo Add a description for this.
798
+ *
799
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L1471
800
+ * One of the sources seem to indicate this was added in 1.17.30.25.
636
801
  */
637
802
  readonly BlendingBiomeHeight: {
638
803
  /**
@@ -645,17 +810,40 @@ export declare const entryContentTypeToFormatMap: {
645
810
  * for the NBT metadata of this chunk. Seems like it might default to something dependent
646
811
  * on the current game or chunk version.
647
812
  *
648
- * @todo Figure out how to parse this.
813
+ * This is an unsigned 64-bit hex value (16 digits, 8 bytes).
649
814
  */
650
815
  readonly MetaDataHash: {
651
816
  /**
652
817
  * The format type of the data.
653
818
  */
654
- readonly type: "unknown";
819
+ readonly type: "hex";
820
+ /**
821
+ * The default value to use when initializing a new entry.
822
+ *
823
+ * Bytes:
824
+ * ```json
825
+ * [0, 0, 0, 0, 0, 0, 0, 0]
826
+ * ```
827
+ */
828
+ readonly defaultValue: Buffer<ArrayBuffer>;
829
+ /**
830
+ * The minimum length of the data in bytes (if the hex data is a string of hexadecimal characters, two characters is one byte).
831
+ */
832
+ readonly minLength: 8;
833
+ /**
834
+ * The maximum length of the data in bytes (if the hex data is a string of hexadecimal characters, two characters is one byte).
835
+ */
836
+ readonly maxLength: 8;
655
837
  };
656
838
  /**
657
839
  * @todo Figure out how to parse this.
658
840
  * @todo Add a description for this.
841
+ *
842
+ * @see https://github.com/robofinch/Prismarine-Anchor/blob/main/crates/bedrock/leveldb-entries/src/entries/blending_data.rs#L10
843
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L526
844
+ *
845
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/8cd37dacbd064f5fb2a4953548739a258b31dd21/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L1475
846
+ * One of the sources seem to indicate this was added in 1.17.30.
659
847
  */
660
848
  readonly BlendingData: {
661
849
  /**
@@ -664,21 +852,64 @@ export declare const entryContentTypeToFormatMap: {
664
852
  readonly type: "unknown";
665
853
  };
666
854
  /**
667
- * @todo Figure out how to parse this.
668
- * @todo Add a description for this.
855
+ * The version of the actor digest data.
669
856
  *
670
- * Seems to always be one byte with a value of `0x00`.
857
+ * Current known versions:
858
+ * - `0`: 1.18.30 Format
671
859
  */
672
860
  readonly ActorDigestVersion: {
673
861
  /**
674
862
  * The format type of the data.
675
863
  */
676
- readonly type: "unknown";
864
+ readonly type: "int";
865
+ /**
866
+ * How many bytes this integer is.
867
+ */
868
+ readonly bytes: 1;
869
+ /**
870
+ * The endianness of the data.
871
+ */
872
+ readonly format: "LE";
873
+ /**
874
+ * The signedness of the data.
875
+ */
876
+ readonly signed: false;
877
+ /**
878
+ * The default value to use when initializing a new entry.
879
+ *
880
+ * Bytes:
881
+ * ```json
882
+ * [0]
883
+ * ```
884
+ */
885
+ readonly defaultValue: Buffer<ArrayBuffer>;
677
886
  };
678
887
  /**
679
- * @deprecated Only used in versions < 1.16.100. Later versions use {@link entryContentTypeToFormatMap.Version}
888
+ * The version of a chunk for versions < 1.16.100.
680
889
  *
681
- * @todo Add a description for this.
890
+ * Possible values:
891
+ * - `0`: v0.9.0
892
+ * - `1`: v0.9.2
893
+ * - `2`: v0.9.5
894
+ * - `3`: v0.17.0.1
895
+ * - `4`: v1.1.0
896
+ * - `5`: Converted from console to v1.1.0
897
+ * - `6`: v1.2.0.2
898
+ * - `7`: v1.2.0
899
+ * - `8`: v1.2.13
900
+ * - `9`: v1.8.0
901
+ * - `10`: v1.9.0
902
+ * - `11`: v1.11.0.1
903
+ * - `12`: v1.11.0.3
904
+ * - `13`: v1.11.0.4
905
+ * - `14`: v1.11.1
906
+ * - `15`: v1.12.0.4
907
+ * - `16`: v1.14.0
908
+ * - `17`: v1.15.0
909
+ * - `18`: v1.16.0.51
910
+ * - `19`: v1.16.0
911
+ *
912
+ * @deprecated Only used in versions < 1.16.100. Later versions use {@link entryContentTypeToFormatMap.Version | Version}
682
913
  */
683
914
  readonly LegacyVersion: {
684
915
  /**
@@ -916,6 +1147,8 @@ export declare const entryContentTypeToFormatMap: {
916
1147
  * @deprecated Only used in versions < 1.5.0.
917
1148
  *
918
1149
  * @todo Add a description for this.
1150
+ *
1151
+ * @see https://github.com/robofinch/Prismarine-Anchor/blob/main/crates/bedrock/leveldb-entries/src/entries/flat_world_layers.rs
919
1152
  */
920
1153
  readonly FlatWorldLayers: {
921
1154
  /**
@@ -927,6 +1160,8 @@ export declare const entryContentTypeToFormatMap: {
927
1160
  * @deprecated It is unknown when this was removed, it was found in a Windows 10 Edition Beta v0.15.0 world.
928
1161
  *
929
1162
  * @todo Add a description for this.
1163
+ *
1164
+ * @see https://github.com/robofinch/Prismarine-Anchor/blob/main/crates/bedrock/leveldb-entries/src/entries/level_spawn_was_fixed.rs
930
1165
  */
931
1166
  readonly LevelSpawnWasFixed: {
932
1167
  /**
@@ -946,7 +1181,7 @@ export declare const entryContentTypeToFormatMap: {
946
1181
  /**
947
1182
  * Stores the location of a lodestone compass.
948
1183
  *
949
- * @todo Add a schema for this.
1184
+ * @see {@link NBTSchemas.nbtSchemas.PositionTrackingDB}
950
1185
  */
951
1186
  readonly PositionTrackingDB: {
952
1187
  /**
@@ -957,7 +1192,7 @@ export declare const entryContentTypeToFormatMap: {
957
1192
  /**
958
1193
  * The last ID used for a lodestone compass.
959
1194
  *
960
- * @todo Add a schema for this.
1195
+ * @see {@link NBTSchemas.nbtSchemas.PositionTrackingLastId}
961
1196
  */
962
1197
  readonly PositionTrackingLastId: {
963
1198
  /**
@@ -1178,7 +1413,6 @@ export declare const entryContentTypeToFormatMap: {
1178
1413
  *
1179
1414
  * @since 1.26.10 (maybe 1.26.0)
1180
1415
  *
1181
- * @todo Update the linked NBT schema once it is known the structure of the items of the `clocks` list.
1182
1416
  * @todo Figure out that this is used for.
1183
1417
  * @todo Figure out what preview and full release this was actually added in.
1184
1418
  */
@@ -1214,13 +1448,46 @@ export declare const entryContentTypeToFormatMap: {
1214
1448
  * and volumes where mobs cannot spawn through the normal biome-based means (such as
1215
1449
  * Trial Chambers).
1216
1450
  *
1217
- * @todo Figure out how to parse this.
1451
+ * @see {@link NBTSchemas.nbtSchemas.AABBVolumes}
1452
+ *
1453
+ * @since 1.21.20 (or some 1.21.20 preview)
1218
1454
  */
1219
1455
  readonly AABBVolumes: {
1220
1456
  /**
1221
1457
  * The format type of the data.
1222
1458
  */
1223
- readonly type: "unknown";
1459
+ readonly type: "custom";
1460
+ /**
1461
+ * The format type that results from the {@link entryContentTypeToFormatMap.AABBVolumes.parse | parse} method.
1462
+ */
1463
+ readonly resultType: "JSONNBT";
1464
+ /**
1465
+ * The function to parse the data.
1466
+ *
1467
+ * The {@link data} parameter should be the buffer read directly from the file or LevelDB entry.
1468
+ *
1469
+ * @param data The data to parse, as a buffer.
1470
+ * @returns The parsed data.
1471
+ *
1472
+ * @throws {RangeError} If the buffer is less than 4 bytes.
1473
+ * @throws {unknown} If an error occurs while parsing the data.
1474
+ */
1475
+ readonly parse: (data: Buffer) => NBTSchemas.NBTSchemaTypes.AABBVolumes;
1476
+ /**
1477
+ * The function to serialize the data.
1478
+ *
1479
+ * This result of this can be written directly to the file or LevelDB entry.
1480
+ *
1481
+ * @param data The data to serialize.
1482
+ * @returns The serialized data, as a buffer.
1483
+ *
1484
+ * @throws {TypeError} If one of the StructureTypes entries are undefined.
1485
+ * @throws {TypeError} If one of the ChunkBoundingBoxes entries are undefined.
1486
+ * @throws {TypeError} If one of the DynamicSpawnAreas entries are undefined.
1487
+ * @throws {TypeError} If one of the StaticSpawnAreas entries are undefined.
1488
+ * @throws {unknown} If an error occurs while serializing the data.
1489
+ */
1490
+ readonly serialize: (data: NBTSchemas.NBTSchemaTypes.AABBVolumes) => Buffer<ArrayBuffer>;
1224
1491
  };
1225
1492
  /**
1226
1493
  * The content type of the `DynamicProperties` LevelDB key, which stores dynamic properties data for add-ons.
@@ -1254,6 +1521,8 @@ export declare const entryContentTypeToFormatMap: {
1254
1521
  * ```
1255
1522
  * {BYTEx4}{BYTEx8}{NBTCompound}{BYTEx8}{NBTCompound}{BYTEx8}{NBTCompound}{BYTEx8}{NBTCompound}
1256
1523
  * ```
1524
+ *
1525
+ * @see {@link NBTSchemas.nbtSchemas.LevelChunkMetaDataDictionary}
1257
1526
  */
1258
1527
  readonly LevelChunkMetaDataDictionary: {
1259
1528
  /**
@@ -1297,8 +1566,11 @@ export declare const entryContentTypeToFormatMap: {
1297
1566
  readonly defaultValue: Buffer<ArrayBuffer>;
1298
1567
  };
1299
1568
  /**
1300
- * @todo Add a schema for this.
1301
1569
  * @todo Add a description for this.
1570
+ *
1571
+ * @see {@link NBTSchemas.nbtSchemas.ChunkLoadedRequest}
1572
+ *
1573
+ * @see https://github.com/MiemieMethod/bedrock-docs/blob/main/.knowledge/wiki%E6%91%98%E5%BD%95/%E4%B8%AD%E6%96%87Minecraft%20Wiki/%E5%9F%BA%E5%B2%A9%E7%89%88LevelDB%E6%A0%BC%E5%BC%8F.wikitext#L1175
1302
1574
  */
1303
1575
  readonly ChunkLoadedRequest: {
1304
1576
  /**
@@ -1327,7 +1599,49 @@ export type EntryContentTypeFormatData = ({
1327
1599
  /**
1328
1600
  * The format type of the data.
1329
1601
  */
1330
- readonly type: "JSON" | "SNBT" | "ASCII" | "binary" | "binaryPlainText" | "hex" | "UTF-8" | "unknown";
1602
+ readonly type: "JSON" | "SNBT" | "unknown";
1603
+ } | {
1604
+ /**
1605
+ * The format type of the data.
1606
+ */
1607
+ readonly type: "ASCII" | "binary" | "binaryPlainText" | "UTF-8";
1608
+ /**
1609
+ * The minimum length of the data.
1610
+ *
1611
+ * If not present, `0` should be assumed.
1612
+ *
1613
+ * @default 0
1614
+ */
1615
+ readonly minLength?: number;
1616
+ /**
1617
+ * The maximum length of the data.
1618
+ *
1619
+ * If not present, `Infinity` should be assumed.
1620
+ *
1621
+ * @default Infinity
1622
+ */
1623
+ readonly maxLength?: number;
1624
+ } | {
1625
+ /**
1626
+ * The format type of the data.
1627
+ */
1628
+ readonly type: "hex";
1629
+ /**
1630
+ * The minimum length of the data in bytes (if the hex data is a string of hexadecimal characters, two characters is one byte).
1631
+ *
1632
+ * If not present, `0` should be assumed.
1633
+ *
1634
+ * @default 0
1635
+ */
1636
+ readonly minLength?: number;
1637
+ /**
1638
+ * The maximum length of the data in bytes (if the hex data is a string of hexadecimal characters, two characters is one byte).
1639
+ *
1640
+ * If not present, `Infinity` should be assumed.
1641
+ *
1642
+ * @default Infinity
1643
+ */
1644
+ readonly maxLength?: number;
1331
1645
  } | {
1332
1646
  /**
1333
1647
  * The format type of the data.