bedrock-portal 2.6.0 → 2.8.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/dist/common/constants.js +1 -1
- package/dist/common/start_game.d.ts +7 -3
- package/dist/common/start_game.js +43 -10
- package/dist/index.js +1 -1
- package/dist/modules/serverFormList.js +23 -11
- package/package.json +1 -1
package/dist/common/constants.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.SessionConfig = {
|
|
|
5
5
|
MinecraftTitleID: '896928775',
|
|
6
6
|
MinecraftSCID: '4fc10100-5f7a-4470-899b-280835760c07',
|
|
7
7
|
MinecraftTemplateName: 'MinecraftLobby',
|
|
8
|
-
MinecraftProtocolVersion:
|
|
8
|
+
MinecraftProtocolVersion: 2225,
|
|
9
9
|
};
|
|
10
10
|
var Joinability;
|
|
11
11
|
(function (Joinability) {
|
|
@@ -11,7 +11,7 @@ export declare const start_game: {
|
|
|
11
11
|
x: number;
|
|
12
12
|
z: number;
|
|
13
13
|
};
|
|
14
|
-
seed:
|
|
14
|
+
seed: number[];
|
|
15
15
|
biome_type: number;
|
|
16
16
|
biome_name: string;
|
|
17
17
|
dimension: string;
|
|
@@ -28,6 +28,7 @@ export declare const start_game: {
|
|
|
28
28
|
editor_world_type: string;
|
|
29
29
|
created_in_editor: boolean;
|
|
30
30
|
exported_from_editor: boolean;
|
|
31
|
+
editor_level_migration_version: string;
|
|
31
32
|
day_cycle_stop_time: number;
|
|
32
33
|
edu_offer: number;
|
|
33
34
|
edu_features_enabled: boolean;
|
|
@@ -77,7 +78,7 @@ export declare const start_game: {
|
|
|
77
78
|
is_trial: boolean;
|
|
78
79
|
rewind_history_size: number;
|
|
79
80
|
server_authoritative_block_breaking: boolean;
|
|
80
|
-
current_tick:
|
|
81
|
+
current_tick: never[];
|
|
81
82
|
enchantment_seed: number;
|
|
82
83
|
block_properties: never[];
|
|
83
84
|
multiplayer_correlation_id: string;
|
|
@@ -88,7 +89,7 @@ export declare const start_game: {
|
|
|
88
89
|
name: string;
|
|
89
90
|
value: {};
|
|
90
91
|
};
|
|
91
|
-
block_pallette_checksum:
|
|
92
|
+
block_pallette_checksum: never[];
|
|
92
93
|
world_template_id: string;
|
|
93
94
|
client_side_generation: boolean;
|
|
94
95
|
block_network_ids_are_hashes: boolean;
|
|
@@ -102,3 +103,6 @@ export declare const start_game: {
|
|
|
102
103
|
world_identifier: string;
|
|
103
104
|
owner_identifier: string;
|
|
104
105
|
};
|
|
106
|
+
export declare const sendStartGame: (client: {
|
|
107
|
+
write: (name: string, params: unknown) => void;
|
|
108
|
+
}) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.start_game = void 0;
|
|
3
|
+
exports.sendStartGame = exports.start_game = void 0;
|
|
4
4
|
exports.start_game = {
|
|
5
5
|
entity_id: '-8589934591',
|
|
6
6
|
runtime_entity_id: '1',
|
|
@@ -14,7 +14,10 @@ exports.start_game = {
|
|
|
14
14
|
x: 0,
|
|
15
15
|
z: 0,
|
|
16
16
|
},
|
|
17
|
-
seed:
|
|
17
|
+
seed: [
|
|
18
|
+
2971351224,
|
|
19
|
+
2018346120,
|
|
20
|
+
],
|
|
18
21
|
biome_type: 0,
|
|
19
22
|
biome_name: 'minecraft:plains',
|
|
20
23
|
dimension: 'overworld',
|
|
@@ -31,7 +34,8 @@ exports.start_game = {
|
|
|
31
34
|
editor_world_type: 'not_editor',
|
|
32
35
|
created_in_editor: false,
|
|
33
36
|
exported_from_editor: false,
|
|
34
|
-
|
|
37
|
+
editor_level_migration_version: 'legacy',
|
|
38
|
+
day_cycle_stop_time: 40,
|
|
35
39
|
edu_offer: 0,
|
|
36
40
|
edu_features_enabled: false,
|
|
37
41
|
edu_product_uuid: '',
|
|
@@ -40,8 +44,8 @@ exports.start_game = {
|
|
|
40
44
|
has_confirmed_platform_locked_content: false,
|
|
41
45
|
is_multiplayer: true,
|
|
42
46
|
broadcast_to_lan: true,
|
|
43
|
-
xbox_live_broadcast_mode:
|
|
44
|
-
platform_broadcast_mode:
|
|
47
|
+
xbox_live_broadcast_mode: 6,
|
|
48
|
+
platform_broadcast_mode: 6,
|
|
45
49
|
enable_commands: true,
|
|
46
50
|
is_texturepacks_required: false,
|
|
47
51
|
gamerules: [],
|
|
@@ -80,18 +84,18 @@ exports.start_game = {
|
|
|
80
84
|
is_trial: false,
|
|
81
85
|
rewind_history_size: 40,
|
|
82
86
|
server_authoritative_block_breaking: true,
|
|
83
|
-
current_tick:
|
|
84
|
-
enchantment_seed:
|
|
87
|
+
current_tick: [],
|
|
88
|
+
enchantment_seed: 905277925,
|
|
85
89
|
block_properties: [],
|
|
86
|
-
multiplayer_correlation_id: '<
|
|
90
|
+
multiplayer_correlation_id: '<nethernet>0e93-a670-dee9-0022',
|
|
87
91
|
server_authoritative_inventory: true,
|
|
88
|
-
engine: '1.26.
|
|
92
|
+
engine: '1.26.60',
|
|
89
93
|
property_data: {
|
|
90
94
|
type: 'compound',
|
|
91
95
|
name: '',
|
|
92
96
|
value: {},
|
|
93
97
|
},
|
|
94
|
-
block_pallette_checksum:
|
|
98
|
+
block_pallette_checksum: [],
|
|
95
99
|
world_template_id: '00000000-0000-0000-0000-000000000000',
|
|
96
100
|
client_side_generation: false,
|
|
97
101
|
block_network_ids_are_hashes: true,
|
|
@@ -105,3 +109,32 @@ exports.start_game = {
|
|
|
105
109
|
world_identifier: '',
|
|
106
110
|
owner_identifier: '',
|
|
107
111
|
};
|
|
112
|
+
const sendStartGame = (client) => {
|
|
113
|
+
// The client validates both structure registries before accepting StartGame.
|
|
114
|
+
const emptyNbtList = {
|
|
115
|
+
type: 'list',
|
|
116
|
+
value: {
|
|
117
|
+
type: 'end',
|
|
118
|
+
value: [],
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
client.write('jigsaw_structure_data', {
|
|
122
|
+
structure_data: {
|
|
123
|
+
type: 'compound',
|
|
124
|
+
name: '',
|
|
125
|
+
value: {
|
|
126
|
+
processors: emptyNbtList,
|
|
127
|
+
template_pools: emptyNbtList,
|
|
128
|
+
jigsaws: emptyNbtList,
|
|
129
|
+
structure_sets: emptyNbtList,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
client.write('voxel_shapes', {
|
|
134
|
+
shapes: [],
|
|
135
|
+
name_map: [],
|
|
136
|
+
custom_shape_count: 0,
|
|
137
|
+
});
|
|
138
|
+
client.write('start_game', exports.start_game);
|
|
139
|
+
};
|
|
140
|
+
exports.sendStartGame = sendStartGame;
|
package/dist/index.js
CHANGED
|
@@ -282,7 +282,7 @@ class BedrockPortal extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
282
282
|
gatherings_configuration: undefined,
|
|
283
283
|
});
|
|
284
284
|
});
|
|
285
|
-
|
|
285
|
+
(0, start_game_1.sendStartGame)(client);
|
|
286
286
|
};
|
|
287
287
|
client.on('resource_pack_client_response', onResourcePackResponse);
|
|
288
288
|
});
|
|
@@ -59,19 +59,31 @@ class ServerFromList extends Module_1.default {
|
|
|
59
59
|
},
|
|
60
60
|
texture_packs: [],
|
|
61
61
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
const onResourcePackResponse = (response) => {
|
|
63
|
+
if (response.response_status === 'refused') {
|
|
64
|
+
client.off('resource_pack_client_response', onResourcePackResponse);
|
|
65
|
+
client.disconnect('Resource packs refused');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (response.response_status === 'send_packs' || response.response_status === 'have_all_packs') {
|
|
69
|
+
client.write('resource_pack_stack', {
|
|
70
|
+
must_accept: false,
|
|
71
|
+
resource_packs: [],
|
|
72
|
+
game_version: '*',
|
|
73
|
+
experiments: [],
|
|
74
|
+
experiments_previously_used: false,
|
|
75
|
+
has_editor_packs: false,
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (response.response_status !== 'completed')
|
|
80
|
+
return;
|
|
81
|
+
client.off('resource_pack_client_response', onResourcePackResponse);
|
|
82
|
+
(0, start_game_1.sendStartGame)(client);
|
|
72
83
|
client.write('item_registry', { itemstates: [] });
|
|
73
84
|
client.write('play_status', { status: 'player_spawn' });
|
|
74
|
-
}
|
|
85
|
+
};
|
|
86
|
+
client.on('resource_pack_client_response', onResourcePackResponse);
|
|
75
87
|
client.on('modal_form_response', (p) => this.handleFormResponse(p, client));
|
|
76
88
|
}
|
|
77
89
|
handleFormResponse(response, client) {
|
package/package.json
CHANGED