Skip to content

1.21.6#3713

Merged
rom1504 merged 15 commits into
PrismarineJS:masterfrom
extremeheat:1.21.6
Aug 17, 2025
Merged

1.21.6#3713
rom1504 merged 15 commits into
PrismarineJS:masterfrom
extremeheat:1.21.6

Conversation

@extremeheat
Copy link
Copy Markdown
Member

@extremeheat extremeheat commented Aug 3, 2025

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 9, 2025

seems remaining failures are pretty trivial. Should be fixable by just asking a coding agent to run the test and fix for a while; if someone want to try

@extremeheat
Copy link
Copy Markdown
Member Author

extremeheat commented Aug 14, 2025

Looks like issue with entity metadata


2025-08-14T19:50:59.8573940Z 2025-08-14T19:50:59.855Z minecraft-protocol read packet play.entity_metadata
2025-08-14T19:50:59.8575003Z 2025-08-14T19:50:59.855Z minecraft-protocol {
2025-08-14T19:50:59.8575456Z   "entityId": 1,
2025-08-14T19:50:59.8575754Z   "metadata": [
2025-08-14T19:50:59.8576021Z     {
2025-08-14T19:50:59.8576275Z       "key": 6,
2025-08-14T19:50:59.8576567Z       "type": "pose",
2025-08-14T19:50:59.8576875Z       "value": 2
2025-08-14T19:50:59.8577142Z     },
2025-08-14T19:50:59.8577389Z     {
2025-08-14T19:50:59.8577644Z       "key": 14,
2025-08-14T19:50:59.8577988Z       "type": "optional_block_pos",
2025-08-14T19:50:59.8578368Z       "value": {
2025-08-14T19:50:59.8578665Z         "x": 2,
2025-08-14T19:50:59.8578857Z         "z": 1,
2025-08-14T19:50:59.8579030Z         "y": -60
2025-08-14T19:50:59.8579197Z       }
2025-08-14T19:50:59.8579338Z     }
2025-08-14T19:50:59.8579484Z   ]
2025-08-14T19:50:59.8579631Z }
2025-08-14T19:50:59.8580002Z 2025-08-14T19:50:59.856Z minecraft-protocol read packet play.advancements
2025-08-14T19:50:59.8580449Z 2025-08-14T19:50:59.857Z minecraft-protocol {
2025-08-14T19:50:59.8580717Z   reset: false,
2025-08-14T19:50:59.8580907Z   advancementMapping: [
2025-08-14T19:50:59.8581230Z     { key: 'minecraft:adventure/sleep_in_bed', value: [Object] },
2025-08-14T19:50:59.8581511Z     {
2025-08-14T19:50:59.8581799Z       key: 'minecraft:adventure/walk_on_powder_snow_with_leather_boots',
2025-08-14T19:50:59.8582112Z       value: [Object]
2025-08-14T19:50:59.8582548Z     },
2025-08-14T19:50:59.8582787Z     { key: 'minecraft:adventure/root', value: [Object] },
2025-08-14T19:50:59.8583169Z     { key: 'minecraft:adventure/adventuring_time', value: [Object] },
2025-08-14T19:50:59.8583460Z     {
2025-08-14T19:50:59.8583685Z       key: 'minecraft:adventure/play_jukebox_in_meadows',
2025-08-14T19:50:59.8583947Z       value: [Object]
2025-08-14T19:50:59.8584114Z     }
2025-08-14T19:50:59.8584260Z   ],
2025-08-14T19:50:59.8584413Z   identifiers: [],
2025-08-14T19:50:59.8584603Z   progressMapping: [
2025-08-14T19:50:59.8584784Z     {
2025-08-14T19:50:59.8585062Z       key: 'minecraft:adventure/walk_on_powder_snow_with_leather_boots',
2025-08-14T19:50:59.8585371Z       value: [Array]
2025-08-14T19:50:59.8585537Z     },
2025-08-14T19:50:59.8585790Z     { key: 'minecraft:adventure/sleep_in_bed', value: [Array] },
2025-08-14T19:50:59.8586063Z     {
2025-08-14T19:50:59.8586286Z       key: 'minecraft:adventure/play_jukebox_in_meadows',
2025-08-14T19:50:59.8586540Z       value: [Array]
2025-08-14T19:50:59.8586708Z     },
2025-08-14T19:50:59.8586970Z     { key: 'minecraft:adventure/adventuring_time', value: [Array] },
2025-08-14T19:50:59.8587323Z     { key: 'minecraft:adventure/root', value: [Array] }
2025-08-14T19:50:59.8587570Z   ],
2025-08-14T19:50:59.8587730Z   showAdvancements: true
2025-08-14T19:50:59.8587920Z }

Mineflayer line

https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/entities.js#L449-L476

@extremeheat
Copy link
Copy Markdown
Member Author

extremeheat commented Aug 14, 2025

Fixed above by using 1.21.5 entities data (1.21.6 is missing entity metadata inside entities.json, but nothing actually changes in .6)

Next server crashes when decoding player chat command packet.


2025-08-14T20:11:55.3809736Z 2025-08-14T20:11:55.380Z minecraft-protocol {
2025-08-14T20:11:55.3810500Z   "reason": {
2025-08-14T20:11:55.3810807Z     "type": "compound",
2025-08-14T20:11:55.3811137Z     "value": {
2025-08-14T20:11:55.3811452Z       "with": {
2025-08-14T20:11:55.3811817Z         "type": "list",
2025-08-14T20:11:55.3812154Z         "value": {
2025-08-14T20:11:55.3812462Z           "type": "string",
2025-08-14T20:11:55.3812824Z           "value": [
2025-08-14T20:11:55.3813792Z             "Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'serverbound/minecraft:player_command'"
2025-08-14T20:11:55.3814692Z           ]
2025-08-14T20:11:55.3814857Z         }
2025-08-14T20:11:55.3815004Z       },
2025-08-14T20:11:55.3815165Z       "translate": {
2025-08-14T20:11:55.3815365Z         "type": "string",
2025-08-14T20:11:55.3815619Z         "value": "disconnect.genericReason"
2025-08-14T20:11:55.3815967Z       }
2025-08-14T20:11:55.3816117Z     }
2025-08-14T20:11:55.3816256Z   }
2025-08-14T20:11:55.3816408Z }

This is preceded by this write


2025-08-14T20:10:58.687Z minecraft-protocol writing packet play.chat_command
2025-08-14T20:11:00.2206186Z 2025-08-14T20:10:58.687Z minecraft-protocol {
2025-08-14T20:11:00.2206666Z   command: 'gamemode creative',
2025-08-14T20:11:00.2207060Z   timestamp: 1755202258687n,
2025-08-14T20:11:00.2207835Z   salt: 1n,
2025-08-14T20:11:00.2208156Z   argumentSignatures: [],
2025-08-14T20:11:00.2208510Z   messageCount: 0,
2025-08-14T20:11:00.2208811Z   checksum: 1,
2025-08-14T20:11:00.2209176Z   acknowledged: <Buffer 00 00 00>
2025-08-14T20:11:00.2209536Z }
2025-08-14T20:11:00.2210144Z 2025-08-14T20:10:58.688Z minecraft-protocol writing packet play.chat_command
2025-08-14T20:11:00.2210881Z 2025-08-14T20:10:58.688Z minecraft-protocol {
2025-08-14T20:11:00.2211375Z   command: 'gamemode survival',
2025-08-14T20:11:00.2211750Z   timestamp: 1755202258688n,
2025-08-14T20:11:00.2212085Z   salt: 1n,
2025-08-14T20:11:00.2212365Z   argumentSignatures: [],
2025-08-14T20:11:00.2212691Z   messageCount: 0,
2025-08-14T20:11:00.2213005Z   checksum: 1,
2025-08-14T20:11:00.2213353Z   acknowledged: <Buffer 00 00 00>
2025-08-14T20:11:00.2213734Z }
2025-08-14T20:11:00.2214333Z 2025-08-14T20:10:58.688Z minecraft-protocol writing packet play.chat_command
2025-08-14T20:11:00.2215093Z 2025-08-14T20:10:58.688Z minecraft-protocol {
2025-08-14T20:11:00.2215611Z   command: 'gamemode creative',
2025-08-14T20:11:00.2216002Z   timestamp: 1755202258688n,
2025-08-14T20:11:00.2216367Z   salt: 1n,
2025-08-14T20:11:00.2216689Z   argumentSignatures: [],
2025-08-14T20:11:00.2217061Z   messageCount: 0,
2025-08-14T20:11:00.2217370Z   checksum: 1,
2025-08-14T20:11:00.2217924Z   acknowledged: <Buffer 00 00 00>
2025-08-14T20:11:00.2218312Z }

This could be a serialization issue, or a logical error in chat checksum computation or issue with acknowledgments

- Update elytra flying to use string mapping 'start_elytra_flying' for 1.21.6+
- Update sprint actions to use string mappings for 1.21.6+
- Move sneak handling to player_input packet for 1.21.6+
- Maintain backward compatibility with older versions using feature detection

Fixes compatibility with Minecraft 1.21.6 protocol changes where:
- entity_action packets now use string mappers instead of numeric IDs
- sneak functionality moved from entity_action to player_input packet

Co-authored-by: Claude <noreply@anthropic.com>
@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 15, 2025

claude fixed elytra, only fishing needs fixing now

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

remaining issue is about fishing_bobber not being detected

Fixed above by using 1.21.5 entities data (1.21.6 is missing entity metadata inside entities.json, but nothing actually changes in .6)

could be related to this

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

ah I see, mcdata has "entities": "pc/1.21.5",

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

1.21.6 is missing entity metadata inside entities.json

we need this fixed

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

PrismarineJS/minecraft-data#1028

I guess there are some issues with metadata there

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

we need some test/schema validating we have entity metadata in mcdata. Maybe something you can help with @ItsDrike

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

one way to fix is to take the metadata keys from 1.21.5 and port them to 1.21.6 file https://github.com/PrismarineJS/minecraft-data/blob/master/data/pc/1.21.5/entities.json

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

seemed you added metadata keys for 1.21.5 in https://github.com/PrismarineJS/minecraft-data/pull/1029/files @extremeheat do you remember what you ran?

@extremeheat
Copy link
Copy Markdown
Member Author

extremeheat commented Aug 16, 2025

Yeah, there's a script to generate in mcdata (tools/js/extractPcEntityMetadata.js), I updated with

/workspace/minecraft-data/tools/js (1.21.6) $ node extractPcEntityMetadata.js 1.21.6
Cloning into '1.21.6'...
remote: Enumerating objects: 6503, done.
remote: Counting objects: 100% (6503/6503), done.
remote: Compressing objects: 100% (5484/5484), done.
remote: Total 6503 (delta 1966), reused 2499 (delta 1014), pack-reused 0 (from 0)
Receiving objects: 100% (6503/6503), 6.04 MiB | 15.54 MiB/s, done.
Resolving deltas: 100% (1966/1966), done.

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

some tests still timeout but I wonder if it's the added logging causing it

@ItsDrike
Copy link
Copy Markdown

ItsDrike commented Aug 16, 2025

we need some test/schema validating we have entity metadata in mcdata. Maybe something you can help with @ItsDrike

As in enforcing the presence of metadataKeys in the entities.json data? The schema currently has that as an optional key, and minecraft-data is missing it in various versions, so if you wanted to enforce that, it would need to be added into all versions where it's missing. That's a lot of versions.

Versions missing metadataKeys information in entities.json for at least one entity entry
  • FAIL: pc/1.7 (50 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.8 (58 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/15w40b (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.9 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.9.1-pre2 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.9.2 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.9.4 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/16w20a (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.10-pre1 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.10 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.10.1 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.10.2 (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/16w35a (64 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.11 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.11.2 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/17w15a (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/17w18b (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.12-pre4 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.12 (110 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.12.1 (110 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.12.2 (110 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/17w50a (110 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.13 (123 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.13.1 (123 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.13.2-pre1 (123 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.13.2-pre2 (123 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.13.2 (123 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.14 (102 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.14.1 (102 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.14.3 (102 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.14.4 (102 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.15 (103 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.15.1 (103 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.15.2 (103 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/20w13b (107 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/20w14a (107 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16-rc1 (107 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16 (107 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16.1 (107 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16.2 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16.3 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16.4 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.16.5 (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/21w07a (108 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.17 (113 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.17.1 (113 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.18 (113 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.18.1 (113 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.18.2 (113 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.19 (118 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.19.2 (118 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.19.3 (119 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: pc/1.21.6 (151 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.16.220 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.17.0 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.17.10 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.17.30 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.17.40 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.18.0 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.18.11 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.18.30 (124 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.1 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.10 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.20 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.21 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.30 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.40 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.50 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.60 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.62 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.63 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.70 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.19.80 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.0 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.10 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.15 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.30 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.40 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.50 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.61 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.71 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.20.80 (120 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.0 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.2 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.20 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.30 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.42 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.50 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.60 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.70 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.80 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.90 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.93 (122 violations) -> ('entities', 0, 'metadataKeys') Field required
  • FAIL: bedrock/1.21.100 (122 violations) -> ('entities', 0, 'metadataKeys') Field required

Perhaps it would only make sense to check this after a certain mc version, e.g. all versions beyond 1.20 need to have this? Though that would require multiple schemas per version, which would likely get pretty annoying to work with, and would probably require some changes in the wrappers, depending on how they're implemented (definitely in node-minecraft-data, which dynamically generates the types from the schemas).

Or do you mean something in the protocol JSON?

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

  1. mineflayer_external 1.21.6v
    team:
    Error: Event teamMemberAdded did not fire within timeout of 20000ms

that's the next thing to fix

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

well also there are these partial read errors

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

we need some test/schema validating we have entity metadata in mcdata. Maybe something you can help with @ItsDrike

As in enforcing the presence of metadataKeys in the entities.json data? The schema currently has that as an optional key, and minecraft-data is missing it in various versions, so if you wanted to enforce that, it would need to be added into all versions where it's missing. That's a lot of versions.

Versions missing metadataKeys information in entities.json for at least one entity entry
Perhaps it would only make sense to check this after a certain mc version, e.g. all versions beyond 1.20 need to have this? Though that would require multiple schemas per version, which would likely get pretty annoying to work with, and would probably require some changes in the wrappers, depending on how they're implemented (definitely in node-minecraft-data, which dynamically generates the types from the schemas).

Or do you mean something in the protocol JSON?

yeah makes sense. Maybe we could enforce it only in PC and starting at version 1.19.4
we may backfill previous versions later but at least it would make sure we have the data for new versions

@ItsDrike
Copy link
Copy Markdown

yeah makes sense. Maybe we could enforce it only in PC and starting at version 1.19.4
we may backfill previous versions later but at least it would make sure we have the data for new versions

This should be possible, but again, wrapper changes would be required for the type generation as this would mean multiple schemas for different versions.

Or do you just want to skip the tests for this key missing on the older versions? That would work, but it's kind of hacky and the schema would be lying then. Also, skipping is annoying since it means no validation for that particular schema at all for the ignored versions, it's not trivial to only skip if a certain specific error occurred and not for multiple errors. I did skip validation in this way for one version as an exception in PrismarineJS/minecraft-data#1056, but even that was done with the expectation that the tints data will be added later on, and fairly soon.

Add logging
@extremeheat
Copy link
Copy Markdown
Member Author

That test for the field can be separate from the schema tests.

From the data consumer standpoint you have to treat it as conditional because the data may or may not exist on some versions.

From data generation standpoint since it's just a script to run to generate we can add it as part of the automated PR generation process

Comment thread lib/plugins/team.js Outdated

function teamHandler (packet) {
const { team: teamName, mode } = packet
console.log("team.packet", packet)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oddly never called

@extremeheat
Copy link
Copy Markdown
Member Author

For the errors it would probably be a good idea to figure out how to retry on failure with debug packet logging enabled. Without it it's a lot harder to debug / diff changes between versions.

Maybe we could even have a script to auto post specific test debug mode diffs

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 16, 2025

For the errors it would probably be a good idea to figure out how to retry on failure with debug packet logging enabled. Without it it's a lot harder to debug / diff changes between versions.

I think we can probably just have a try catch in the common of external test, but we'd need to do the beforeEach logic manually without mocha

@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 17, 2025

Nice everything passing

Still got to fix these partial read errors though.

@rom1504 rom1504 marked this pull request as ready for review August 17, 2025 20:14
@rom1504 rom1504 merged commit 01f537c into PrismarineJS:master Aug 17, 2025
34 of 54 checks passed
@rom1504
Copy link
Copy Markdown
Member

rom1504 commented Aug 17, 2025

/makerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants