minecraft-data 2.93.0 → 2.96.0
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 -1
- package/data.js +40 -0
- package/doc/api.md +30 -0
- package/doc/history.md +12 -0
- package/index.d.ts +15 -1
- package/index.js +31 -15
- package/lib/loader.js +5 -0
- package/minecraft-data/README.md +2 -2
- package/minecraft-data/data/bedrock/1.17.10/proto.yml +3171 -0
- package/minecraft-data/data/bedrock/1.17.10/types.yml +1703 -0
- package/minecraft-data/data/bedrock/1.17.30/proto.yml +3234 -0
- package/minecraft-data/data/bedrock/1.17.30/protocol.json +9366 -0
- package/minecraft-data/data/bedrock/1.17.30/types.yml +1749 -0
- package/minecraft-data/data/bedrock/1.17.40/protocol.json +9493 -0
- package/minecraft-data/data/bedrock/common/protocolVersions.json +12 -0
- package/minecraft-data/data/bedrock/common/versions.json +3 -1
- package/minecraft-data/data/bedrock/latest/proto.yml +109 -13
- package/minecraft-data/data/bedrock/latest/types.yml +80 -19
- package/minecraft-data/data/dataPaths.json +40 -0
- package/minecraft-data/data/pc/common/protocolVersions.json +56 -0
- package/minecraft-data/doc/history.md +9 -0
- package/minecraft-data/tools/js/compileProtocol.js +2 -2
- package/package.json +4 -3
- package/test/bedrock.js +26 -0
- package/test/load.js +0 -6
- package/typings/index-template.d.ts +14 -0
|
@@ -43,5 +43,17 @@
|
|
|
43
43
|
"minecraftVersion": "1.17.10",
|
|
44
44
|
"majorVersion": "1.17",
|
|
45
45
|
"releaseType": "release"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"version": 465,
|
|
49
|
+
"minecraftVersion": "1.17.30",
|
|
50
|
+
"majorVersion": "1.17",
|
|
51
|
+
"releaseType": "release"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"version": 471,
|
|
55
|
+
"minecraftVersion": "1.17.40",
|
|
56
|
+
"majorVersion": "1.17",
|
|
57
|
+
"releaseType": "release"
|
|
46
58
|
}
|
|
47
59
|
]
|
|
@@ -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.17.
|
|
4
|
+
!version: 1.17.40
|
|
5
5
|
|
|
6
6
|
# Some ProtoDef aliases
|
|
7
7
|
string: ["pstring",{"countType":"varint"}] # String / array types
|
|
@@ -330,6 +330,7 @@ packet_start_game:
|
|
|
330
330
|
limited_world_width: li32
|
|
331
331
|
limited_world_length: li32
|
|
332
332
|
is_new_nether: bool
|
|
333
|
+
edu_resource_uri: EducationSharedResourceURI
|
|
333
334
|
experimental_gameplay_override: bool
|
|
334
335
|
# A base64 encoded world ID that is used to identify the world.
|
|
335
336
|
level_id: string
|
|
@@ -670,6 +671,9 @@ packet_level_event:
|
|
|
670
671
|
2031: particle_wax_off
|
|
671
672
|
2032: particle_scrape
|
|
672
673
|
2033: particle_electric_spark
|
|
674
|
+
2034: particle_turtle_egg
|
|
675
|
+
2035: particle_sculk_shriek
|
|
676
|
+
2036: sculk_catalyst_bloom
|
|
673
677
|
|
|
674
678
|
3001: start_rain
|
|
675
679
|
3002: start_thunder
|
|
@@ -690,7 +694,7 @@ packet_level_event:
|
|
|
690
694
|
3509: cauldron_clean_banner
|
|
691
695
|
3600: block_start_break
|
|
692
696
|
3601: block_stop_break
|
|
693
|
-
4000: set_data
|
|
697
|
+
4000: set_data
|
|
694
698
|
9800: players_sleeping
|
|
695
699
|
0x4000: add_particle_mask
|
|
696
700
|
# 0x4000 | + particle ID
|
|
@@ -933,6 +937,8 @@ packet_entity_pick_request:
|
|
|
933
937
|
!bound: server
|
|
934
938
|
runtime_entity_id: lu64
|
|
935
939
|
selected_slot: u8
|
|
940
|
+
# WithData is true if the pick request requests the entity metadata.
|
|
941
|
+
with_data: bool
|
|
936
942
|
|
|
937
943
|
# PlayerAction is sent by the client when it executes any action, for example starting to sprint, swim,
|
|
938
944
|
# starting the breaking of a block, dropping an item, etc.
|
|
@@ -955,7 +961,9 @@ packet_player_action:
|
|
|
955
961
|
packet_hurt_armor:
|
|
956
962
|
!id: 0x26
|
|
957
963
|
!bound: client
|
|
958
|
-
|
|
964
|
+
cause: zigzag32
|
|
965
|
+
damage: zigzag32
|
|
966
|
+
armor_slots: zigzag64
|
|
959
967
|
|
|
960
968
|
packet_set_entity_data:
|
|
961
969
|
!id: 0x27
|
|
@@ -1122,9 +1130,16 @@ packet_crafting_data:
|
|
|
1122
1130
|
!id: 0x34
|
|
1123
1131
|
!bound: client
|
|
1124
1132
|
recipes: Recipes
|
|
1133
|
+
# PotionContainerChangeRecipes is a list of all recipes to convert a potion from one type to another,
|
|
1134
|
+
# such as from a drinkable potion to a splash potion, or from a splash potion to a lingering potion.
|
|
1125
1135
|
potion_type_recipes: PotionTypeRecipes
|
|
1136
|
+
# MaterialReducers is a list of all material reducers which is used in education edition chemistry.
|
|
1137
|
+
material_reducers: MaterialReducer[]varint
|
|
1126
1138
|
potion_container_recipes: PotionContainerChangeRecipes
|
|
1127
|
-
|
|
1139
|
+
# ClearRecipes indicates if all recipes currently active on the client should be cleaned. Doing this
|
|
1140
|
+
# means that the client will have no recipes active by itself: Any CraftingData packets previously sent
|
|
1141
|
+
# will also be discarded, and only the recipes in this CraftingData packet will be used.
|
|
1142
|
+
clear_recipes: bool
|
|
1128
1143
|
|
|
1129
1144
|
# CraftingEvent is sent by the client when it crafts a particular item. Note that this packet may be fully
|
|
1130
1145
|
# ignored, as the InventoryTransaction packet provides all the information required.
|
|
@@ -1625,9 +1640,10 @@ packet_available_commands:
|
|
|
1625
1640
|
# with enums that have a big amount of options. To illustrate, it can make
|
|
1626
1641
|
# <false|true|yes|no> <$Name: bool>.
|
|
1627
1642
|
CommandFlags: [ "bitfield", [
|
|
1628
|
-
{ "name": "unused", "size":
|
|
1643
|
+
{ "name": "unused", "size": 1, "signed": false }, # 6 unused upper bits
|
|
1644
|
+
{ "name": "collapse_enum", "size": 1, "signed": false },
|
|
1629
1645
|
{ "name": "has_semantic_constraint", "size": 1, "signed": false },
|
|
1630
|
-
{ "name": "
|
|
1646
|
+
{ "name": "as_chained_command", "size": 1, "signed": false },
|
|
1631
1647
|
]]
|
|
1632
1648
|
|
|
1633
1649
|
# enum_size_based_on_values_len: native
|
|
@@ -2100,6 +2116,14 @@ packet_photo_transfer:
|
|
|
2100
2116
|
# is set to PhotoName, it will display the photo (provided Education Edition is used).
|
|
2101
2117
|
# The photo image is downloaded to a sub-folder with this book ID.
|
|
2102
2118
|
book_id: string
|
|
2119
|
+
# PhotoType is one of the three photo types above.
|
|
2120
|
+
photo_type: u8
|
|
2121
|
+
# SourceType is the source photo type. It is one of the three photo types above.
|
|
2122
|
+
source_type: u8
|
|
2123
|
+
# OwnerEntityUniqueID is the entity unique ID of the photo's owner.
|
|
2124
|
+
owner_entity_unique_id: i64
|
|
2125
|
+
# NewPhotoName is the new name of the photo.
|
|
2126
|
+
new_photo_name: string
|
|
2103
2127
|
|
|
2104
2128
|
# ModalFormRequest is sent by the server to make the client open a form. This form may be either a modal form
|
|
2105
2129
|
# which has two options, a menu form for a selection of options and a custom form for properties.
|
|
@@ -2267,12 +2291,7 @@ packet_update_block_synced:
|
|
|
2267
2291
|
# TransitionType is the type of the transition that happened. It is either BlockToEntityTransition, when
|
|
2268
2292
|
# a block placed becomes a falling entity, or EntityToBlockTransition, when a falling entity hits the
|
|
2269
2293
|
# ground and becomes a solid block again.
|
|
2270
|
-
transition_type:
|
|
2271
|
-
# For falling sand, when a sand turns to an entity
|
|
2272
|
-
0: entity
|
|
2273
|
-
# When sand turns back to a new block
|
|
2274
|
-
1: create
|
|
2275
|
-
2: destroy
|
|
2294
|
+
transition_type: varint => TransitionType
|
|
2276
2295
|
|
|
2277
2296
|
|
|
2278
2297
|
# MoveActorDelta is sent by the server to move an entity. The packet is specifically optimised to save as
|
|
@@ -2645,11 +2664,24 @@ packet_education_settings:
|
|
|
2645
2664
|
# CanResizeCodeBuilder specifies if clients connected to the world should be able to resize the code
|
|
2646
2665
|
# builder when it is opened.
|
|
2647
2666
|
CanResizeCodeBuilder: bool
|
|
2667
|
+
disable_legacy_title_bar: bool
|
|
2668
|
+
post_process_filter: string
|
|
2669
|
+
screenshot_border_path: string
|
|
2670
|
+
has_agent_capabilities: bool
|
|
2671
|
+
agent_capabilities: has_agent_capabilities ?
|
|
2672
|
+
if true:
|
|
2673
|
+
has: bool
|
|
2674
|
+
can_modify_blocks: bool
|
|
2648
2675
|
HasOverrideURI: bool
|
|
2649
2676
|
OverrideURI: HasOverrideURI?
|
|
2650
2677
|
if true: string
|
|
2651
2678
|
# HasQuiz specifies if the world has a quiz connected to it.
|
|
2652
2679
|
HasQuiz: bool
|
|
2680
|
+
has_external_link_settings: bool
|
|
2681
|
+
external_link_settings: has_external_link_settings ?
|
|
2682
|
+
has: bool
|
|
2683
|
+
url: string
|
|
2684
|
+
display_name: string
|
|
2653
2685
|
|
|
2654
2686
|
# MultiPlayerSettings is sent by the client to update multi-player related settings server-side and sent back
|
|
2655
2687
|
# to online players by the server.
|
|
@@ -3023,6 +3055,8 @@ packet_animate_entity:
|
|
|
3023
3055
|
next_state: string
|
|
3024
3056
|
# StopCondition is a MoLang expression that specifies when the animation should be stopped.
|
|
3025
3057
|
stop_condition: string
|
|
3058
|
+
# StopConditionVersion is the MoLang stop condition version.
|
|
3059
|
+
stop_condition_version: li64
|
|
3026
3060
|
# Controller is the animation controller that is used to manage animations. These controllers decide when
|
|
3027
3061
|
# to play which animation.
|
|
3028
3062
|
controller: string
|
|
@@ -3134,6 +3168,7 @@ packet_add_volume_entity:
|
|
|
3134
3168
|
# The Runtime Entity ID
|
|
3135
3169
|
entity_id: varint64
|
|
3136
3170
|
nbt: nbt
|
|
3171
|
+
engine_version: string
|
|
3137
3172
|
|
|
3138
3173
|
# RemoveVolumeEntity indicates a volume entity to be removed from server to client.
|
|
3139
3174
|
packet_remove_volume_entity:
|
|
@@ -3168,4 +3203,65 @@ packet_npc_dialogue:
|
|
|
3168
3203
|
# NPCName is the name of the NPC to be displayed to the client.
|
|
3169
3204
|
npc_name: string
|
|
3170
3205
|
# ActionJSON is the JSON string of the buttons/actions the server can perform.
|
|
3171
|
-
action_json: string
|
|
3206
|
+
action_json: string
|
|
3207
|
+
|
|
3208
|
+
packet_edu_uri_resource_packet:
|
|
3209
|
+
!id: 0xaa
|
|
3210
|
+
resource: EducationSharedResourceURI
|
|
3211
|
+
|
|
3212
|
+
# CreatePhoto is a packet that allows players to export photos from their portfolios into items in their inventory.
|
|
3213
|
+
# This packet only works on the Education Edition version of Minecraft.
|
|
3214
|
+
packet_create_photo:
|
|
3215
|
+
!id: 0xab
|
|
3216
|
+
# EntityUniqueID is the unique ID of the entity.
|
|
3217
|
+
entity_unique_id: i64
|
|
3218
|
+
# PhotoName is the name of the photo.
|
|
3219
|
+
photo_name: string
|
|
3220
|
+
# ItemName is the name of the photo as an item.
|
|
3221
|
+
item_name: string
|
|
3222
|
+
|
|
3223
|
+
# UpdateSubChunkBlocks is essentially just UpdateBlock packet, however for a set of blocks in a sub chunk.
|
|
3224
|
+
packet_update_subchunk_blocks:
|
|
3225
|
+
!id: 0xac
|
|
3226
|
+
# SubChunkX, SubChunkY, and SubChunkZ help identify the sub chunk.
|
|
3227
|
+
x: varint
|
|
3228
|
+
y: varint
|
|
3229
|
+
z: varint
|
|
3230
|
+
# Blocks contains each updated block change entry.
|
|
3231
|
+
blocks: BlockUpdate[]varint
|
|
3232
|
+
# Extra contains each updated block change entry for the second layer, usually for waterlogged blocks.
|
|
3233
|
+
extra: BlockUpdate[]varint
|
|
3234
|
+
|
|
3235
|
+
packet_photo_info_request:
|
|
3236
|
+
!id: 0xad
|
|
3237
|
+
photo_id: zigzag64
|
|
3238
|
+
|
|
3239
|
+
packet_subchunk:
|
|
3240
|
+
!id: 0xae
|
|
3241
|
+
dimension: varint
|
|
3242
|
+
x: varint
|
|
3243
|
+
y: varint
|
|
3244
|
+
z: varint
|
|
3245
|
+
# Data is the actual sub chunk data, such as the blocks.
|
|
3246
|
+
data: ByteArray
|
|
3247
|
+
request_result: varint =>
|
|
3248
|
+
0: undefined
|
|
3249
|
+
1: success
|
|
3250
|
+
2: chunk_not_found
|
|
3251
|
+
3: invalid_dimension
|
|
3252
|
+
4: player_not_found
|
|
3253
|
+
5: y_index_out_of_bounds
|
|
3254
|
+
heightmap_type: u8 =>
|
|
3255
|
+
0: no_data
|
|
3256
|
+
1: has_data
|
|
3257
|
+
2: too_high
|
|
3258
|
+
3: too_low
|
|
3259
|
+
_: heightmap_type ?
|
|
3260
|
+
if has_data: '["buffer", { "count": 256 }]'
|
|
3261
|
+
|
|
3262
|
+
packet_subchunk_request:
|
|
3263
|
+
!id: 0xaf
|
|
3264
|
+
dimension: varint
|
|
3265
|
+
x: varint
|
|
3266
|
+
y: varint
|
|
3267
|
+
z: varint
|
|
@@ -678,10 +678,9 @@ Skin:
|
|
|
678
678
|
expression_type: lf32
|
|
679
679
|
cape_data: SkinImage
|
|
680
680
|
geometry_data: string
|
|
681
|
+
geometry_data_version: string
|
|
681
682
|
animation_data: string
|
|
682
|
-
|
|
683
|
-
persona: bool
|
|
684
|
-
cape_on_classic: bool
|
|
683
|
+
|
|
685
684
|
cape_id: string
|
|
686
685
|
full_skin_id: string
|
|
687
686
|
arm_size: string
|
|
@@ -695,6 +694,12 @@ Skin:
|
|
|
695
694
|
piece_tint_colors: []li32
|
|
696
695
|
piece_type: string
|
|
697
696
|
colors: string[]li32
|
|
697
|
+
premium: bool
|
|
698
|
+
persona: bool
|
|
699
|
+
# PersonaCapeOnClassicSkin specifies if the skin had a Persona cape (in-game skin creator cape) equipped
|
|
700
|
+
# on a classic skin.
|
|
701
|
+
cape_on_classic: bool
|
|
702
|
+
primary_user: bool
|
|
698
703
|
|
|
699
704
|
PlayerRecords:
|
|
700
705
|
type: u8 =>
|
|
@@ -787,62 +792,68 @@ ItemStackRequest:
|
|
|
787
792
|
type_id: u8 =>
|
|
788
793
|
# TakeStackRequestAction is sent by the client to the server to take x amount of items from one slot in a
|
|
789
794
|
# container to the cursor.
|
|
790
|
-
|
|
795
|
+
- take
|
|
791
796
|
# PlaceStackRequestAction is sent by the client to the server to place x amount of items from one slot into
|
|
792
797
|
# another slot, such as when shift clicking an item in the inventory to move it around or when moving an item
|
|
793
798
|
# in the cursor into a slot.
|
|
794
|
-
|
|
799
|
+
- place
|
|
795
800
|
# SwapStackRequestAction is sent by the client to swap the item in its cursor with an item present in another
|
|
796
801
|
# container. The two item stacks swap places.
|
|
797
|
-
|
|
802
|
+
- swap
|
|
798
803
|
# DropStackRequestAction is sent by the client when it drops an item out of the inventory when it has its
|
|
799
804
|
# inventory opened. This action is not sent when a player drops an item out of the hotbar using the Q button
|
|
800
805
|
# (or the equivalent on mobile). The InventoryTransaction packet is still used for that action, regardless of
|
|
801
806
|
# whether the item stack network IDs are used or not.
|
|
802
|
-
|
|
807
|
+
- drop
|
|
803
808
|
# DestroyStackRequestAction is sent by the client when it destroys an item in creative mode by moving it
|
|
804
809
|
# back into the creative inventory.
|
|
805
|
-
|
|
810
|
+
- destroy
|
|
806
811
|
# ConsumeStackRequestAction is sent by the client when it uses an item to craft another item. The original
|
|
807
812
|
# item is 'consumed'.
|
|
808
|
-
|
|
813
|
+
- consume
|
|
809
814
|
# CreateStackRequestAction is sent by the client when an item is created through being used as part of a
|
|
810
815
|
# recipe. For example, when milk is used to craft a cake, the buckets are leftover. The buckets are moved to
|
|
811
816
|
# the slot sent by the client here.
|
|
812
817
|
# Note that before this is sent, an action for consuming all items in the crafting table/grid is sent. Items
|
|
813
818
|
# that are not fully consumed when used for a recipe should not be destroyed there, but instead, should be
|
|
814
819
|
# turned into their respective resulting items.
|
|
815
|
-
|
|
820
|
+
- create
|
|
816
821
|
# LabTableCombineStackRequestAction is sent by the client when it uses a lab table to combine item stacks.
|
|
817
|
-
|
|
822
|
+
- lab_table_combine
|
|
818
823
|
# BeaconPaymentStackRequestAction is sent by the client when it submits an item to enable effects from a
|
|
819
824
|
# beacon. These items will have been moved into the beacon item slot in advance.
|
|
820
|
-
|
|
825
|
+
- beacon_payment
|
|
821
826
|
# MineBlockStackRequestAction is sent by the client when it breaks a block.
|
|
822
|
-
|
|
827
|
+
- mine_block
|
|
823
828
|
# CraftRecipeStackRequestAction is sent by the client the moment it begins crafting an item. This is the
|
|
824
829
|
# first action sent, before the Consume and Create item stack request actions.
|
|
825
830
|
# This action is also sent when an item is enchanted. Enchanting should be treated mostly the same way as
|
|
826
831
|
# crafting, where the old item is consumed.
|
|
827
|
-
|
|
832
|
+
- craft_recipe
|
|
828
833
|
# AutoCraftRecipeStackRequestAction is sent by the client similarly to the CraftRecipeStackRequestAction. The
|
|
829
834
|
# only difference is that the recipe is automatically created and crafted by shift clicking the recipe book.
|
|
830
|
-
|
|
835
|
+
- craft_recipe_auto #recipe book?
|
|
831
836
|
# CraftCreativeStackRequestAction is sent by the client when it takes an item out fo the creative inventory.
|
|
832
837
|
# The item is thus not really crafted, but instantly created.
|
|
833
|
-
|
|
838
|
+
- craft_creative
|
|
834
839
|
# CraftRecipeOptionalStackRequestAction is sent when using an anvil. When this action is sent, the
|
|
835
840
|
# CustomNames field in the respective stack request is non-empty and contains the name of the item created
|
|
836
841
|
# using the anvil.
|
|
837
|
-
|
|
842
|
+
- optional
|
|
843
|
+
# CraftGrindstoneRecipeStackRequestAction is sent when a grindstone recipe is crafted. It contains the RecipeNetworkID
|
|
844
|
+
# to identify the recipe crafted, and the cost for crafting the recipe.
|
|
845
|
+
- craft_grindstone_request
|
|
846
|
+
# CraftLoomRecipeStackRequestAction is sent when a loom recipe is crafted. It simply contains the
|
|
847
|
+
# pattern identifier to figure out what pattern is meant to be applied to the item.
|
|
848
|
+
- craft_loom_request
|
|
838
849
|
# CraftNonImplementedStackRequestAction is an action sent for inventory actions that aren't yet implemented
|
|
839
850
|
# in the new system. These include, for example, anvils.
|
|
840
|
-
|
|
851
|
+
- non_implemented # anvils aren't fully implemented yet
|
|
841
852
|
# CraftResultsDeprecatedStackRequestAction is an additional, deprecated packet sent by the client after
|
|
842
853
|
# crafting. It holds the final results and the amount of times the recipe was crafted. It shouldn't be used.
|
|
843
854
|
# This action is also sent when an item is enchanted. Enchanting should be treated mostly the same way as
|
|
844
855
|
# crafting, where the old item is consumed.
|
|
845
|
-
|
|
856
|
+
- results_deprecated
|
|
846
857
|
_: type_id ?
|
|
847
858
|
if take or place:
|
|
848
859
|
count: u8
|
|
@@ -898,6 +909,15 @@ ItemStackRequest:
|
|
|
898
909
|
recipe_network_id: varint
|
|
899
910
|
# Most likely the index in the request's filter strings that this action is using
|
|
900
911
|
filtered_string_index: li32
|
|
912
|
+
if craft_grindstone_request:
|
|
913
|
+
# RecipeNetworkID is the network ID of the recipe that is about to be crafted. This network ID matches
|
|
914
|
+
# one of the recipes sent in the CraftingData packet, where each of the recipes have a RecipeNetworkID as
|
|
915
|
+
recipe_network_id: varint
|
|
916
|
+
# Cost is the cost of the recipe that was crafted.
|
|
917
|
+
cost: varint
|
|
918
|
+
if craft_loom_request:
|
|
919
|
+
# Pattern is the pattern identifier for the loom recipe.
|
|
920
|
+
pattern: string
|
|
901
921
|
if non_implemented: void
|
|
902
922
|
if results_deprecated:
|
|
903
923
|
result_items: ItemLegacy[]varint
|
|
@@ -1072,6 +1092,47 @@ StructureBlockSettings:
|
|
|
1072
1092
|
# Pivot is the pivot around which the structure may be rotated.
|
|
1073
1093
|
pivot: vec3f
|
|
1074
1094
|
|
|
1095
|
+
# EducationSharedResourceURI is an education edition feature that is used for transmitting
|
|
1096
|
+
# education resource settings to clients. It contains a button name and a link URL.
|
|
1097
|
+
EducationSharedResourceURI:
|
|
1098
|
+
# ButtonName is the button name of the resource URI.
|
|
1099
|
+
button_name: string
|
|
1100
|
+
# LinkURI is the link URI for the resource URI.
|
|
1101
|
+
link_uri: string
|
|
1102
|
+
|
|
1103
|
+
EducationExternalLinkSettings:
|
|
1104
|
+
# URL is the external link URL.
|
|
1105
|
+
url: string
|
|
1106
|
+
# DisplayName is the display name in game.
|
|
1107
|
+
display_name: string
|
|
1108
|
+
|
|
1109
|
+
BlockUpdate:
|
|
1110
|
+
position: BlockCoordinates
|
|
1111
|
+
runtime_id: varint
|
|
1112
|
+
flags: varint
|
|
1113
|
+
# EntityUniqueID is the unique ID of the falling block entity that the block transitions to or that the
|
|
1114
|
+
# entity transitions from.
|
|
1115
|
+
# Note that for both possible values for TransitionType, the EntityUniqueID should point to the falling
|
|
1116
|
+
# block entity involved.
|
|
1117
|
+
entity_unique_id: zigzag64
|
|
1118
|
+
# TransitionType is the type of the transition that happened. It is either BlockToEntityTransition, when
|
|
1119
|
+
# a block placed becomes a falling entity, or EntityToBlockTransition, when a falling entity hits the
|
|
1120
|
+
# ground and becomes a solid block again.
|
|
1121
|
+
transition_type: varint => TransitionType
|
|
1122
|
+
|
|
1123
|
+
TransitionType: =>
|
|
1124
|
+
# For falling sand, when a sand turns to an entity
|
|
1125
|
+
0: entity
|
|
1126
|
+
# When sand turns back to a new block
|
|
1127
|
+
1: create
|
|
1128
|
+
2: destroy
|
|
1129
|
+
|
|
1130
|
+
MaterialReducer:
|
|
1131
|
+
mix: varint
|
|
1132
|
+
items:
|
|
1133
|
+
network_id: varint
|
|
1134
|
+
count: varint
|
|
1135
|
+
|
|
1075
1136
|
# List of Window IDs. When a new container is opened (container_open), a new sequential Window ID is created.
|
|
1076
1137
|
# Below window IDs are hard-coded and created when the game starts and the server does not
|
|
1077
1138
|
# send a `container_open` for them.
|
|
@@ -1011,11 +1011,13 @@
|
|
|
1011
1011
|
},
|
|
1012
1012
|
"1.16.201": {
|
|
1013
1013
|
"protocol": "bedrock/1.16.201",
|
|
1014
|
+
"steve": "bedrock/1.16.201",
|
|
1014
1015
|
"proto": "bedrock/1.17.0",
|
|
1015
1016
|
"types": "bedrock/1.17.0"
|
|
1016
1017
|
},
|
|
1017
1018
|
"1.16.210": {
|
|
1018
1019
|
"protocol": "bedrock/1.16.210",
|
|
1020
|
+
"steve": "bedrock/1.16.201",
|
|
1019
1021
|
"proto": "bedrock/1.17.0",
|
|
1020
1022
|
"types": "bedrock/1.17.0"
|
|
1021
1023
|
},
|
|
@@ -1058,6 +1060,44 @@
|
|
|
1058
1060
|
"steve": "bedrock/1.16.201",
|
|
1059
1061
|
"blocksB2J": "bedrock/1.17.10",
|
|
1060
1062
|
"blocksJ2B": "bedrock/1.17.10",
|
|
1063
|
+
"proto": "bedrock/1.17.10",
|
|
1064
|
+
"types": "bedrock/1.17.10"
|
|
1065
|
+
},
|
|
1066
|
+
"1.17.30": {
|
|
1067
|
+
"blocks": "bedrock/1.17.10",
|
|
1068
|
+
"blockStates": "bedrock/1.17.10",
|
|
1069
|
+
"blockCollisionShapes": "bedrock/1.17.10",
|
|
1070
|
+
"biomes": "bedrock/1.17.0",
|
|
1071
|
+
"items": "bedrock/1.17.10",
|
|
1072
|
+
"recipes": "bedrock/1.17.10",
|
|
1073
|
+
"instruments": "bedrock/1.17.0",
|
|
1074
|
+
"materials": "pc/1.17",
|
|
1075
|
+
"enchantments": "pc/1.17",
|
|
1076
|
+
"effects": "pc/1.17",
|
|
1077
|
+
"protocol": "bedrock/1.17.30",
|
|
1078
|
+
"windows": "bedrock/1.16.201",
|
|
1079
|
+
"steve": "bedrock/1.16.201",
|
|
1080
|
+
"blocksB2J": "bedrock/1.17.10",
|
|
1081
|
+
"blocksJ2B": "bedrock/1.17.10",
|
|
1082
|
+
"proto": "bedrock/1.17.30",
|
|
1083
|
+
"types": "bedrock/1.17.30"
|
|
1084
|
+
},
|
|
1085
|
+
"1.17.40": {
|
|
1086
|
+
"blocks": "bedrock/1.17.10",
|
|
1087
|
+
"blockStates": "bedrock/1.17.10",
|
|
1088
|
+
"blockCollisionShapes": "bedrock/1.17.10",
|
|
1089
|
+
"biomes": "bedrock/1.17.0",
|
|
1090
|
+
"items": "bedrock/1.17.10",
|
|
1091
|
+
"recipes": "bedrock/1.17.10",
|
|
1092
|
+
"instruments": "bedrock/1.17.0",
|
|
1093
|
+
"materials": "pc/1.17",
|
|
1094
|
+
"enchantments": "pc/1.17",
|
|
1095
|
+
"effects": "pc/1.17",
|
|
1096
|
+
"protocol": "bedrock/1.17.40",
|
|
1097
|
+
"windows": "bedrock/1.16.201",
|
|
1098
|
+
"steve": "bedrock/1.16.201",
|
|
1099
|
+
"blocksB2J": "bedrock/1.17.10",
|
|
1100
|
+
"blocksJ2B": "bedrock/1.17.10",
|
|
1061
1101
|
"proto": "bedrock/latest",
|
|
1062
1102
|
"types": "bedrock/latest"
|
|
1063
1103
|
}
|
|
@@ -1,4 +1,60 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"minecraftVersion": "21w44a",
|
|
4
|
+
"version": 1073741872,
|
|
5
|
+
"dataVersion": 2845,
|
|
6
|
+
"usesNetty": true,
|
|
7
|
+
"majorVersion": "1.18"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"minecraftVersion": "21w43a",
|
|
11
|
+
"version": 1073741871,
|
|
12
|
+
"dataVersion": 2844,
|
|
13
|
+
"usesNetty": true,
|
|
14
|
+
"majorVersion": "1.18"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"minecraftVersion": "21w42a",
|
|
18
|
+
"version": 1073741870,
|
|
19
|
+
"dataVersion": 2840,
|
|
20
|
+
"usesNetty": true,
|
|
21
|
+
"majorVersion": "1.18"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"minecraftVersion": "21w41a",
|
|
25
|
+
"version": 1073741869,
|
|
26
|
+
"dataVersion": 2839,
|
|
27
|
+
"usesNetty": true,
|
|
28
|
+
"majorVersion": "1.18"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"minecraftVersion": "21w40a",
|
|
32
|
+
"version": 1073741868,
|
|
33
|
+
"dataVersion": 2838,
|
|
34
|
+
"usesNetty": true,
|
|
35
|
+
"majorVersion": "1.18"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"minecraftVersion": "21w39a",
|
|
39
|
+
"version": 1073741867,
|
|
40
|
+
"dataVersion": 2836,
|
|
41
|
+
"usesNetty": true,
|
|
42
|
+
"majorVersion": "1.18"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"minecraftVersion": "21w38a",
|
|
46
|
+
"version": 1073741866,
|
|
47
|
+
"dataVersion": 2835,
|
|
48
|
+
"usesNetty": true,
|
|
49
|
+
"majorVersion": "1.18"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"minecraftVersion": "21w37a",
|
|
53
|
+
"version": 1073741865,
|
|
54
|
+
"dataVersion": 2834,
|
|
55
|
+
"usesNetty": true,
|
|
56
|
+
"majorVersion": "1.18"
|
|
57
|
+
},
|
|
2
58
|
{
|
|
3
59
|
"minecraftVersion": "1.17.1",
|
|
4
60
|
"version": 756,
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 2.96.0
|
|
2
|
+
* Add bedrock 1.17.40 protocol data (@extremeheat)
|
|
3
|
+
|
|
4
|
+
## 2.95.0
|
|
5
|
+
* bedrock: Add 1.17.30 protocol data
|
|
6
|
+
|
|
7
|
+
## 2.94.0
|
|
8
|
+
* bedrock: Add skin data paths for older versions
|
|
9
|
+
|
|
1
10
|
## 2.93.0
|
|
2
11
|
* Fix enchantment.json saying that thorns goes on chestplate (@u9g)
|
|
3
12
|
|
|
@@ -59,8 +59,8 @@ if (!module.parent) {
|
|
|
59
59
|
for (const versionId in versions) {
|
|
60
60
|
console.log('Compiling bedrock protocol', versionId)
|
|
61
61
|
const ver = versions[versionId]
|
|
62
|
-
if (ver.
|
|
63
|
-
convert(ver.
|
|
62
|
+
if (ver.proto) {
|
|
63
|
+
convert(ver.proto.includes('latest') ? 'latest' : versionId)
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
} else { // build the specified version
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minecraft-data",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.96.0",
|
|
4
4
|
"description": "Provide easy access to minecraft data in node.js",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"tonicExampleFilename": "example.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"generate:types": "node typings/generate-typings.js",
|
|
9
|
-
"generate:data": "./bin/generate_data.js",
|
|
9
|
+
"generate:data": "node ./bin/generate_data.js",
|
|
10
10
|
"test:types": "tsc typings/test-typings && node typings/test-typings.js",
|
|
11
11
|
"test": "require-self && npm run generate:data && npm run lint && npm run test:types && mocha",
|
|
12
12
|
"lint": "standard",
|
|
13
|
-
"
|
|
13
|
+
"prepare": "require-self && npm run generate:data && npm run generate:types",
|
|
14
14
|
"fix": "standard --fix"
|
|
15
15
|
},
|
|
16
16
|
"standard": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^16.0.0",
|
|
37
37
|
"json-schema-to-typescript": "^10.0.3",
|
|
38
|
+
"minecraft-packets": "^1.4.0",
|
|
38
39
|
"mocha": "^9.0.0",
|
|
39
40
|
"require-self": "^0.2.3",
|
|
40
41
|
"standard": "^16.0.1",
|
package/test/bedrock.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* eslint-env mocha */
|
|
2
|
+
// const assert = require('assert')
|
|
3
|
+
// const packets = require('minecraft-packets').bedrock
|
|
4
|
+
|
|
5
|
+
// function test (version) {
|
|
6
|
+
// console.log('->', version)
|
|
7
|
+
// const packet = packets[version]['from-server']
|
|
8
|
+
// const mcd = require('minecraft-data')('bedrock_' + version)
|
|
9
|
+
// if (!mcd.items) {
|
|
10
|
+
// console.log(`Don't have data for '${version}', skipping`)
|
|
11
|
+
// return
|
|
12
|
+
// }
|
|
13
|
+
// mcd.loadItemPalette(packet.start_game[-1].json.itemstates)
|
|
14
|
+
// const { item, block } = mcd.findItemByName('acacia_trapdoor')
|
|
15
|
+
// assert.ok(item)
|
|
16
|
+
// assert.ok(block)
|
|
17
|
+
// assert.strictEqual(mcd.findItemByRuntimeId(1).blockId, 1)
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
// describe('can query bedrock items', function () {
|
|
21
|
+
// for (const version in packets) {
|
|
22
|
+
// it('works on ' + version, function () {
|
|
23
|
+
// test(version)
|
|
24
|
+
// })
|
|
25
|
+
// }
|
|
26
|
+
// })
|
package/test/load.js
CHANGED
|
@@ -20,10 +20,4 @@ describe('load', () => {
|
|
|
20
20
|
const firstDataVersion = require('minecraft-data')('15w32a') // dataVersion = 100
|
|
21
21
|
assert.strictEqual(firstDataVersion.isNewerOrEqualTo('15w31c'), true) // no dataVersion
|
|
22
22
|
})
|
|
23
|
-
it('version lookup', () => {
|
|
24
|
-
const mcData = require('minecraft-data')
|
|
25
|
-
for (const ver of mcData.versions.pc) {
|
|
26
|
-
assert.notStrictEqual(mcData(ver.version), null)
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
23
|
})
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
// This will interface will merge with the generated one
|
|
2
|
+
export interface Version {
|
|
3
|
+
// Returns true if the current version is greater than or equal to the `other` version's dataVersion
|
|
4
|
+
['>='](other)
|
|
5
|
+
// Returns true if the current version is greater than the `other` version's dataVersion
|
|
6
|
+
['>'](other)
|
|
7
|
+
// Returns true if the current version is less than the `other` version's dataVersion
|
|
8
|
+
['<'](other)
|
|
9
|
+
// Returns true if the current version is less than than or equal to the `other` version's dataVersion
|
|
10
|
+
['<='](other)
|
|
11
|
+
// Returns true if the current version is equal to the `other` version's dataVersion
|
|
12
|
+
['=='](other)
|
|
13
|
+
type: 'pc' | 'bedrock'
|
|
14
|
+
}
|
|
1
15
|
|
|
2
16
|
export interface VersionSet {
|
|
3
17
|
pc: { [version: string]: Version };
|