bedrock-portal-nethernet 2.0.2 → 2.0.3
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/protocol.d.ts +66 -22
- package/dist/protocol.js +238 -60
- package/dist/serverPlayer.js +13 -3
- package/package.json +1 -1
package/dist/protocol.d.ts
CHANGED
|
@@ -2157,6 +2157,33 @@ declare const _default: {
|
|
|
2157
2157
|
529: string;
|
|
2158
2158
|
530: string;
|
|
2159
2159
|
531: string;
|
|
2160
|
+
532: string;
|
|
2161
|
+
533: string;
|
|
2162
|
+
534: string;
|
|
2163
|
+
535: string;
|
|
2164
|
+
536: string;
|
|
2165
|
+
537: string;
|
|
2166
|
+
538: string;
|
|
2167
|
+
539: string;
|
|
2168
|
+
540: string;
|
|
2169
|
+
541: string;
|
|
2170
|
+
542: string;
|
|
2171
|
+
543: string;
|
|
2172
|
+
544: string;
|
|
2173
|
+
545: string;
|
|
2174
|
+
546: string;
|
|
2175
|
+
547: string;
|
|
2176
|
+
548: string;
|
|
2177
|
+
549: string;
|
|
2178
|
+
550: string;
|
|
2179
|
+
551: string;
|
|
2180
|
+
552: string;
|
|
2181
|
+
553: string;
|
|
2182
|
+
554: string;
|
|
2183
|
+
555: string;
|
|
2184
|
+
556: string;
|
|
2185
|
+
557: string;
|
|
2186
|
+
558: string;
|
|
2160
2187
|
};
|
|
2161
2188
|
})[];
|
|
2162
2189
|
LegacyEntityType: (string | {
|
|
@@ -2455,6 +2482,10 @@ declare const _default: {
|
|
|
2455
2482
|
115: string;
|
|
2456
2483
|
116: string;
|
|
2457
2484
|
117: string;
|
|
2485
|
+
118: string;
|
|
2486
|
+
119: string;
|
|
2487
|
+
120: string;
|
|
2488
|
+
121: string;
|
|
2458
2489
|
};
|
|
2459
2490
|
})[];
|
|
2460
2491
|
FullContainerName: (string | ({
|
|
@@ -2818,6 +2849,7 @@ declare const _default: {
|
|
|
2818
2849
|
325: string;
|
|
2819
2850
|
326: string;
|
|
2820
2851
|
327: string;
|
|
2852
|
+
328: string;
|
|
2821
2853
|
};
|
|
2822
2854
|
})[];
|
|
2823
2855
|
} | {
|
|
@@ -3046,6 +3078,7 @@ declare const _default: {
|
|
|
3046
3078
|
player_update_entity_overrides: string;
|
|
3047
3079
|
player_location: string;
|
|
3048
3080
|
clientbound_controls_scheme: string;
|
|
3081
|
+
server_script_debug_drawer: string;
|
|
3049
3082
|
};
|
|
3050
3083
|
})[];
|
|
3051
3084
|
})[])[];
|
|
@@ -5402,6 +5435,16 @@ declare const _default: {
|
|
|
5402
5435
|
name: string;
|
|
5403
5436
|
type: string;
|
|
5404
5437
|
}[])[];
|
|
5438
|
+
HeightMapDataType: (string | {
|
|
5439
|
+
type: string;
|
|
5440
|
+
mappings: {
|
|
5441
|
+
0: string;
|
|
5442
|
+
1: string;
|
|
5443
|
+
2: string;
|
|
5444
|
+
3: string;
|
|
5445
|
+
4: string;
|
|
5446
|
+
};
|
|
5447
|
+
})[];
|
|
5405
5448
|
SubChunkEntryWithoutCaching: (string | {
|
|
5406
5449
|
countType: string;
|
|
5407
5450
|
type: (string | ({
|
|
@@ -5421,17 +5464,6 @@ declare const _default: {
|
|
|
5421
5464
|
6: string;
|
|
5422
5465
|
};
|
|
5423
5466
|
})[];
|
|
5424
|
-
} | {
|
|
5425
|
-
name: string;
|
|
5426
|
-
type: (string | {
|
|
5427
|
-
type: string;
|
|
5428
|
-
mappings: {
|
|
5429
|
-
0: string;
|
|
5430
|
-
1: string;
|
|
5431
|
-
2: string;
|
|
5432
|
-
3: string;
|
|
5433
|
-
};
|
|
5434
|
-
})[];
|
|
5435
5467
|
} | {
|
|
5436
5468
|
name: string;
|
|
5437
5469
|
type: (string | {
|
|
@@ -5472,17 +5504,6 @@ declare const _default: {
|
|
|
5472
5504
|
};
|
|
5473
5505
|
default: string;
|
|
5474
5506
|
})[];
|
|
5475
|
-
} | {
|
|
5476
|
-
name: string;
|
|
5477
|
-
type: (string | {
|
|
5478
|
-
type: string;
|
|
5479
|
-
mappings: {
|
|
5480
|
-
0: string;
|
|
5481
|
-
1: string;
|
|
5482
|
-
2: string;
|
|
5483
|
-
3: string;
|
|
5484
|
-
};
|
|
5485
|
-
})[];
|
|
5486
5507
|
} | {
|
|
5487
5508
|
name: string;
|
|
5488
5509
|
type: (string | {
|
|
@@ -6170,6 +6191,29 @@ declare const _default: {
|
|
|
6170
6191
|
};
|
|
6171
6192
|
})[];
|
|
6172
6193
|
}[])[];
|
|
6194
|
+
packet_server_script_debug_drawer: (string | {
|
|
6195
|
+
name: string;
|
|
6196
|
+
type: (string | {
|
|
6197
|
+
countType: string;
|
|
6198
|
+
type: (string | ({
|
|
6199
|
+
name: string;
|
|
6200
|
+
type: string;
|
|
6201
|
+
} | {
|
|
6202
|
+
name: string;
|
|
6203
|
+
type: (string | (string | {
|
|
6204
|
+
type: string;
|
|
6205
|
+
mappings: {
|
|
6206
|
+
0: string;
|
|
6207
|
+
1: string;
|
|
6208
|
+
2: string;
|
|
6209
|
+
3: string;
|
|
6210
|
+
4: string;
|
|
6211
|
+
5: string;
|
|
6212
|
+
};
|
|
6213
|
+
})[])[];
|
|
6214
|
+
})[])[];
|
|
6215
|
+
})[];
|
|
6216
|
+
}[])[];
|
|
6173
6217
|
};
|
|
6174
6218
|
};
|
|
6175
6219
|
export default _default;
|
package/dist/protocol.js
CHANGED
|
@@ -1042,6 +1042,7 @@ exports.default = {
|
|
|
1042
1042
|
'collidable',
|
|
1043
1043
|
'wasd_air_controlled',
|
|
1044
1044
|
'does_server_auth_only_dismount',
|
|
1045
|
+
'body_rotation_always_follows_head',
|
|
1045
1046
|
],
|
|
1046
1047
|
},
|
|
1047
1048
|
],
|
|
@@ -4265,27 +4266,54 @@ exports.default = {
|
|
|
4265
4266
|
508: 'hurt_reduced',
|
|
4266
4267
|
509: 'wind_charge_burst',
|
|
4267
4268
|
510: 'imitate_drowned',
|
|
4268
|
-
511: '
|
|
4269
|
-
512: '
|
|
4270
|
-
513: '
|
|
4271
|
-
514: '
|
|
4272
|
-
515: '
|
|
4273
|
-
516: '
|
|
4274
|
-
517: '
|
|
4275
|
-
518: '
|
|
4276
|
-
519: '
|
|
4277
|
-
520: '
|
|
4278
|
-
521: '
|
|
4279
|
-
522: '
|
|
4280
|
-
523: '
|
|
4281
|
-
524: '
|
|
4282
|
-
525: '
|
|
4283
|
-
526: '
|
|
4284
|
-
527: '
|
|
4285
|
-
528: '
|
|
4286
|
-
529: '
|
|
4287
|
-
530: '
|
|
4288
|
-
531: '
|
|
4269
|
+
511: 'imitate_creaking',
|
|
4270
|
+
512: 'bundle_insert_failed',
|
|
4271
|
+
513: 'sponge_absorb',
|
|
4272
|
+
514: '_',
|
|
4273
|
+
515: 'block_creaking_heart_trail',
|
|
4274
|
+
516: 'creaking_heart_spawn',
|
|
4275
|
+
517: 'activate',
|
|
4276
|
+
518: 'deactivate',
|
|
4277
|
+
519: 'freeze',
|
|
4278
|
+
520: 'unfreeze',
|
|
4279
|
+
521: 'open',
|
|
4280
|
+
522: 'open_long',
|
|
4281
|
+
523: 'close',
|
|
4282
|
+
524: 'close_long',
|
|
4283
|
+
525: 'imitate_phantom',
|
|
4284
|
+
526: 'imitate_zoglin',
|
|
4285
|
+
527: 'imitate_guardian',
|
|
4286
|
+
528: 'imitate_ravager',
|
|
4287
|
+
529: 'imitate_pillager',
|
|
4288
|
+
530: 'place_in_water',
|
|
4289
|
+
531: 'state_change',
|
|
4290
|
+
532: 'imitate_happy_ghast',
|
|
4291
|
+
533: 'unique_generic',
|
|
4292
|
+
534: 'record_tears',
|
|
4293
|
+
535: 'the_end_light_flash',
|
|
4294
|
+
536: 'lead_leash',
|
|
4295
|
+
537: 'lead_unleash',
|
|
4296
|
+
538: 'lead_break',
|
|
4297
|
+
539: 'unsaddle',
|
|
4298
|
+
540: 'armor_crack_wolf',
|
|
4299
|
+
541: 'armor_break_wolf',
|
|
4300
|
+
542: 'armor_repair_wolf',
|
|
4301
|
+
543: 'mace_smash_air',
|
|
4302
|
+
544: 'mace_smash_ground',
|
|
4303
|
+
545: 'trail_spawner_charge_activate',
|
|
4304
|
+
546: 'trail_spawner_ambient_ominous',
|
|
4305
|
+
547: 'ominous_item_spawner_spawn_item',
|
|
4306
|
+
548: 'ominous_bottle_end_use',
|
|
4307
|
+
549: 'mace_smash_heavy_ground',
|
|
4308
|
+
550: 'ominous_item_spawner_spawn_item_begin',
|
|
4309
|
+
551: '_',
|
|
4310
|
+
552: 'apply_effect_bad_omen',
|
|
4311
|
+
553: 'apply_effect_raid_omen',
|
|
4312
|
+
554: 'apply_effect_trial_omen',
|
|
4313
|
+
555: 'ominous_item_spawner_about_to_spawn_item',
|
|
4314
|
+
556: 'record_creator',
|
|
4315
|
+
557: 'record_creator_music_box',
|
|
4316
|
+
558: 'record_precipice',
|
|
4289
4317
|
},
|
|
4290
4318
|
},
|
|
4291
4319
|
],
|
|
@@ -4602,13 +4630,6 @@ exports.default = {
|
|
|
4602
4630
|
'bool',
|
|
4603
4631
|
],
|
|
4604
4632
|
},
|
|
4605
|
-
{
|
|
4606
|
-
name: 'align_target_and_camera_forward',
|
|
4607
|
-
type: [
|
|
4608
|
-
'option',
|
|
4609
|
-
'bool',
|
|
4610
|
-
],
|
|
4611
|
-
},
|
|
4612
4633
|
{
|
|
4613
4634
|
name: 'aim_assist',
|
|
4614
4635
|
type: [
|
|
@@ -4801,6 +4822,10 @@ exports.default = {
|
|
|
4801
4822
|
115: 'conn_client_signalling_error',
|
|
4802
4823
|
116: 'sub_client_login_disabled',
|
|
4803
4824
|
117: 'deep_link_trying_to_open_demo_world_while_signed_in',
|
|
4825
|
+
118: 'async_join_task_denied',
|
|
4826
|
+
119: 'realms_timeline_required',
|
|
4827
|
+
120: 'guest_withough_host',
|
|
4828
|
+
121: 'failed_to_join_experience',
|
|
4804
4829
|
},
|
|
4805
4830
|
},
|
|
4806
4831
|
],
|
|
@@ -5718,6 +5743,7 @@ exports.default = {
|
|
|
5718
5743
|
325: 'player_update_entity_overrides',
|
|
5719
5744
|
326: 'player_location',
|
|
5720
5745
|
327: 'clientbound_controls_scheme',
|
|
5746
|
+
328: 'server_script_debug_drawer',
|
|
5721
5747
|
},
|
|
5722
5748
|
},
|
|
5723
5749
|
],
|
|
@@ -5950,6 +5976,7 @@ exports.default = {
|
|
|
5950
5976
|
player_update_entity_overrides: 'packet_player_update_entity_overrides',
|
|
5951
5977
|
player_location: 'packet_player_location',
|
|
5952
5978
|
clientbound_controls_scheme: 'packet_clientbound_controls_scheme',
|
|
5979
|
+
server_script_debug_drawer: 'packet_server_script_debug_drawer',
|
|
5953
5980
|
},
|
|
5954
5981
|
},
|
|
5955
5982
|
],
|
|
@@ -6080,6 +6107,10 @@ exports.default = {
|
|
|
6080
6107
|
name: 'has_scripts',
|
|
6081
6108
|
type: 'bool',
|
|
6082
6109
|
},
|
|
6110
|
+
{
|
|
6111
|
+
name: 'disable_vibrant_visuals',
|
|
6112
|
+
type: 'bool',
|
|
6113
|
+
},
|
|
6083
6114
|
{
|
|
6084
6115
|
name: 'world_template',
|
|
6085
6116
|
type: [
|
|
@@ -6644,6 +6675,10 @@ exports.default = {
|
|
|
6644
6675
|
name: 'scenario_identifier',
|
|
6645
6676
|
type: 'string',
|
|
6646
6677
|
},
|
|
6678
|
+
{
|
|
6679
|
+
name: 'owner_identifier',
|
|
6680
|
+
type: 'string',
|
|
6681
|
+
},
|
|
6647
6682
|
{
|
|
6648
6683
|
name: 'level_id',
|
|
6649
6684
|
type: 'string',
|
|
@@ -6660,20 +6695,6 @@ exports.default = {
|
|
|
6660
6695
|
name: 'is_trial',
|
|
6661
6696
|
type: 'bool',
|
|
6662
6697
|
},
|
|
6663
|
-
{
|
|
6664
|
-
name: 'movement_authority',
|
|
6665
|
-
type: [
|
|
6666
|
-
'mapper',
|
|
6667
|
-
{
|
|
6668
|
-
type: 'zigzag32',
|
|
6669
|
-
mappings: {
|
|
6670
|
-
0: 'client',
|
|
6671
|
-
1: 'server',
|
|
6672
|
-
2: 'server_with_rewind',
|
|
6673
|
-
},
|
|
6674
|
-
},
|
|
6675
|
-
],
|
|
6676
|
-
},
|
|
6677
6698
|
{
|
|
6678
6699
|
name: 'rewind_history_size',
|
|
6679
6700
|
type: 'zigzag32',
|
|
@@ -12245,6 +12266,19 @@ exports.default = {
|
|
|
12245
12266
|
},
|
|
12246
12267
|
],
|
|
12247
12268
|
],
|
|
12269
|
+
HeightMapDataType: [
|
|
12270
|
+
'mapper',
|
|
12271
|
+
{
|
|
12272
|
+
type: 'u8',
|
|
12273
|
+
mappings: {
|
|
12274
|
+
0: 'no_data',
|
|
12275
|
+
1: 'has_data',
|
|
12276
|
+
2: 'too_high',
|
|
12277
|
+
3: 'too_low',
|
|
12278
|
+
4: 'all_copied',
|
|
12279
|
+
},
|
|
12280
|
+
},
|
|
12281
|
+
],
|
|
12248
12282
|
SubChunkEntryWithoutCaching: [
|
|
12249
12283
|
'array',
|
|
12250
12284
|
{
|
|
@@ -12288,25 +12322,35 @@ exports.default = {
|
|
|
12288
12322
|
},
|
|
12289
12323
|
{
|
|
12290
12324
|
name: 'heightmap_type',
|
|
12325
|
+
type: 'HeightMapDataType',
|
|
12326
|
+
},
|
|
12327
|
+
{
|
|
12328
|
+
name: 'heightmap',
|
|
12291
12329
|
type: [
|
|
12292
|
-
'
|
|
12330
|
+
'switch',
|
|
12293
12331
|
{
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12332
|
+
compareTo: 'heightmap_type',
|
|
12333
|
+
fields: {
|
|
12334
|
+
has_data: [
|
|
12335
|
+
'buffer',
|
|
12336
|
+
{
|
|
12337
|
+
count: 256,
|
|
12338
|
+
},
|
|
12339
|
+
],
|
|
12300
12340
|
},
|
|
12301
12341
|
},
|
|
12302
12342
|
],
|
|
12303
12343
|
},
|
|
12304
12344
|
{
|
|
12305
|
-
name: '
|
|
12345
|
+
name: 'render_heightmap_type',
|
|
12346
|
+
type: 'HeightMapDataType',
|
|
12347
|
+
},
|
|
12348
|
+
{
|
|
12349
|
+
name: 'render_heightmap',
|
|
12306
12350
|
type: [
|
|
12307
12351
|
'switch',
|
|
12308
12352
|
{
|
|
12309
|
-
compareTo: '
|
|
12353
|
+
compareTo: 'render_heightmap_type',
|
|
12310
12354
|
fields: {
|
|
12311
12355
|
has_data: [
|
|
12312
12356
|
'buffer',
|
|
@@ -12374,25 +12418,35 @@ exports.default = {
|
|
|
12374
12418
|
},
|
|
12375
12419
|
{
|
|
12376
12420
|
name: 'heightmap_type',
|
|
12421
|
+
type: 'HeightMapDataType',
|
|
12422
|
+
},
|
|
12423
|
+
{
|
|
12424
|
+
name: 'heightmap',
|
|
12377
12425
|
type: [
|
|
12378
|
-
'
|
|
12426
|
+
'switch',
|
|
12379
12427
|
{
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12428
|
+
compareTo: 'heightmap_type',
|
|
12429
|
+
fields: {
|
|
12430
|
+
has_data: [
|
|
12431
|
+
'buffer',
|
|
12432
|
+
{
|
|
12433
|
+
count: 256,
|
|
12434
|
+
},
|
|
12435
|
+
],
|
|
12386
12436
|
},
|
|
12387
12437
|
},
|
|
12388
12438
|
],
|
|
12389
12439
|
},
|
|
12390
12440
|
{
|
|
12391
|
-
name: '
|
|
12441
|
+
name: 'render_heightmap_type',
|
|
12442
|
+
type: 'HeightMapDataType',
|
|
12443
|
+
},
|
|
12444
|
+
{
|
|
12445
|
+
name: 'render_heightmap',
|
|
12392
12446
|
type: [
|
|
12393
12447
|
'switch',
|
|
12394
12448
|
{
|
|
12395
|
-
compareTo: '
|
|
12449
|
+
compareTo: 'render_heightmap_type',
|
|
12396
12450
|
fields: {
|
|
12397
12451
|
has_data: [
|
|
12398
12452
|
'buffer',
|
|
@@ -13215,6 +13269,10 @@ exports.default = {
|
|
|
13215
13269
|
'bool',
|
|
13216
13270
|
],
|
|
13217
13271
|
},
|
|
13272
|
+
{
|
|
13273
|
+
name: 'remove_ignore_starting_values',
|
|
13274
|
+
type: 'bool',
|
|
13275
|
+
},
|
|
13218
13276
|
],
|
|
13219
13277
|
],
|
|
13220
13278
|
],
|
|
@@ -14134,5 +14192,125 @@ exports.default = {
|
|
|
14134
14192
|
},
|
|
14135
14193
|
],
|
|
14136
14194
|
],
|
|
14195
|
+
packet_server_script_debug_drawer: [
|
|
14196
|
+
'container',
|
|
14197
|
+
[
|
|
14198
|
+
{
|
|
14199
|
+
name: 'shapes',
|
|
14200
|
+
type: [
|
|
14201
|
+
'array',
|
|
14202
|
+
{
|
|
14203
|
+
countType: 'varint',
|
|
14204
|
+
type: [
|
|
14205
|
+
'container',
|
|
14206
|
+
[
|
|
14207
|
+
{
|
|
14208
|
+
name: 'network_id',
|
|
14209
|
+
type: 'varint64',
|
|
14210
|
+
},
|
|
14211
|
+
{
|
|
14212
|
+
name: 'shape_type',
|
|
14213
|
+
type: [
|
|
14214
|
+
'option',
|
|
14215
|
+
[
|
|
14216
|
+
'mapper',
|
|
14217
|
+
{
|
|
14218
|
+
type: 'u8',
|
|
14219
|
+
mappings: {
|
|
14220
|
+
0: 'line',
|
|
14221
|
+
1: 'box',
|
|
14222
|
+
2: 'sphere',
|
|
14223
|
+
3: 'circle',
|
|
14224
|
+
4: 'text',
|
|
14225
|
+
5: 'arrow',
|
|
14226
|
+
},
|
|
14227
|
+
},
|
|
14228
|
+
],
|
|
14229
|
+
],
|
|
14230
|
+
},
|
|
14231
|
+
{
|
|
14232
|
+
name: 'location',
|
|
14233
|
+
type: [
|
|
14234
|
+
'option',
|
|
14235
|
+
'vec3f',
|
|
14236
|
+
],
|
|
14237
|
+
},
|
|
14238
|
+
{
|
|
14239
|
+
name: 'scale',
|
|
14240
|
+
type: [
|
|
14241
|
+
'option',
|
|
14242
|
+
'lf32',
|
|
14243
|
+
],
|
|
14244
|
+
},
|
|
14245
|
+
{
|
|
14246
|
+
name: 'rotation',
|
|
14247
|
+
type: [
|
|
14248
|
+
'option',
|
|
14249
|
+
'vec3f',
|
|
14250
|
+
],
|
|
14251
|
+
},
|
|
14252
|
+
{
|
|
14253
|
+
name: 'time_left',
|
|
14254
|
+
type: [
|
|
14255
|
+
'option',
|
|
14256
|
+
'lf32',
|
|
14257
|
+
],
|
|
14258
|
+
},
|
|
14259
|
+
{
|
|
14260
|
+
name: 'color',
|
|
14261
|
+
type: [
|
|
14262
|
+
'option',
|
|
14263
|
+
'li32',
|
|
14264
|
+
],
|
|
14265
|
+
},
|
|
14266
|
+
{
|
|
14267
|
+
name: 'text',
|
|
14268
|
+
type: [
|
|
14269
|
+
'option',
|
|
14270
|
+
'string',
|
|
14271
|
+
],
|
|
14272
|
+
},
|
|
14273
|
+
{
|
|
14274
|
+
name: 'box_bound',
|
|
14275
|
+
type: [
|
|
14276
|
+
'option',
|
|
14277
|
+
'vec3f',
|
|
14278
|
+
],
|
|
14279
|
+
},
|
|
14280
|
+
{
|
|
14281
|
+
name: 'line_end_location',
|
|
14282
|
+
type: [
|
|
14283
|
+
'option',
|
|
14284
|
+
'vec3f',
|
|
14285
|
+
],
|
|
14286
|
+
},
|
|
14287
|
+
{
|
|
14288
|
+
name: 'arrow_head_length',
|
|
14289
|
+
type: [
|
|
14290
|
+
'option',
|
|
14291
|
+
'lf32',
|
|
14292
|
+
],
|
|
14293
|
+
},
|
|
14294
|
+
{
|
|
14295
|
+
name: 'arrow_head_radius',
|
|
14296
|
+
type: [
|
|
14297
|
+
'option',
|
|
14298
|
+
'lf32',
|
|
14299
|
+
],
|
|
14300
|
+
},
|
|
14301
|
+
{
|
|
14302
|
+
name: 'segment_count',
|
|
14303
|
+
type: [
|
|
14304
|
+
'option',
|
|
14305
|
+
'u8',
|
|
14306
|
+
],
|
|
14307
|
+
},
|
|
14308
|
+
],
|
|
14309
|
+
],
|
|
14310
|
+
},
|
|
14311
|
+
],
|
|
14312
|
+
},
|
|
14313
|
+
],
|
|
14314
|
+
],
|
|
14137
14315
|
},
|
|
14138
14316
|
};
|
package/dist/serverPlayer.js
CHANGED
|
@@ -117,10 +117,20 @@ class Player extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
117
117
|
}
|
|
118
118
|
// Parse login data
|
|
119
119
|
const tokens = body.params.tokens;
|
|
120
|
-
const authChain = JSON.parse(tokens.identity);
|
|
121
|
-
const skinChain = tokens.client;
|
|
122
120
|
try {
|
|
123
|
-
|
|
121
|
+
const skinChain = tokens.client;
|
|
122
|
+
const authChain = JSON.parse(tokens.identity);
|
|
123
|
+
let chain;
|
|
124
|
+
if (authChain.Certificate) { // 1.21.90+
|
|
125
|
+
chain = JSON.parse(authChain.Certificate).chain;
|
|
126
|
+
}
|
|
127
|
+
else if (authChain.chain) {
|
|
128
|
+
chain = authChain.chain;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
throw new Error('Invalid login packet: missing chain or Certificate');
|
|
132
|
+
}
|
|
133
|
+
var { key, userData, skinData } = this.decodeLoginJWT(chain, skinChain); // eslint-disable-line
|
|
124
134
|
}
|
|
125
135
|
catch (e) {
|
|
126
136
|
debug(this.connection.connectionId, e);
|