bedrock-portal 0.9.3 → 0.9.4

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -40,9 +40,9 @@ class BedrockPortal extends tiny_typed_emitter_1.TypedEmitter {
40
40
  webRTCNetworkId: (0, util_1.getRandomUint64)(),
41
41
  ...options,
42
42
  world: {
43
- hostName: 'Bedrock Portal v0.9.2',
43
+ hostName: 'Bedrock Portal v0.9.4',
44
44
  name: 'By LucienHH',
45
- version: '0.9.2',
45
+ version: '0.9.4',
46
46
  memberCount: 0,
47
47
  maxMemberCount: 10,
48
48
  ...options.world,
@@ -164,10 +164,21 @@ class BedrockPortal extends tiny_typed_emitter_1.TypedEmitter {
164
164
  this.modules.set(constructed.name, constructed);
165
165
  }
166
166
  onServerConnection = (client) => {
167
- client.once('join', () => {
168
- client.write('start_game', start_game_1.start_game);
169
- client.once('set_player_game_type', () => {
170
- client.write('transfer', { server_address: this.options.ip, port: this.options.port });
167
+ client.on('join', () => {
168
+ client.write('resource_packs_info', {
169
+ must_accept: false,
170
+ has_scripts: false,
171
+ behaviour_packs: [],
172
+ world_template: { uuid: '550e8400-e29b-41d4-a716-446655440000', version: '' },
173
+ texture_packs: [],
174
+ resource_pack_links: [],
175
+ });
176
+ client.write('resource_pack_stack', { must_accept: false, behavior_packs: [], resource_packs: [], game_version: '', experiments: [], experiments_previously_used: false });
177
+ client.once('resource_pack_client_response', () => {
178
+ client.write('start_game', start_game_1.start_game);
179
+ client.once('set_player_game_type', () => {
180
+ client.write('transfer', { server_address: this.options.ip, port: this.options.port });
181
+ });
171
182
  });
172
183
  });
173
184
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bedrock-portal",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Creates a joinable session in Minecraft Bedrock Edition that can route players to their a specified host",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",