Conversation
Bundle a reviewed 26.3 entity-data snapshot so the registry no longer rejects a 26.3 server as newer than the latest bundled snapshot. The snapshot is derived from the official Mojang-mapped Paper 26.3 artifact with the same tooling that reproduces the reviewed 26.2 snapshot byte for byte; it differs from 26.2 only by the EnderMan to Enderman rename and the new Cushion entity, whose DyeColor COLOR field is at index 8. - Bump PacketEvents to 2.14.0, the first release with the 26.3 protocol. - Map the new DyeColor serializer in the runtime type table and the key generator so generated keys cover GeneratedEntityMetadataKeys.Cushion. - Preserve locally reviewed snapshots in the daily entity-data sync instead of deleting snapshots that upstream has not published yet. - Route the 26.1+ attack packet in the Mineflayer integration fixture; entity attacks moved out of the interact packet into ServerboundAttackPacket. - Supply a log manager in the test harness, which PacketEvents 2.14.0 dereferences while parsing built-in item component data. - Document the provenance, artifacts and remaining uncertainty of locally reviewed snapshots in data/entity-data/README.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade VirtualEntities to Minecraft 26.3.
2.13.0→2.14.0(first release withClientVersion.V_26_3, protocol 777)26.3entity-data snapshot, so the library no longer throwsEntity-data version '26.3' is newer than the latest bundled snapshot '26.2.0'on a 26.3 serverDyeColormetadata serializer in both the runtime type table and the key generatortools/sync-entity-data.shto preserve locally reviewed snapshots that upstream has not publishedThe library still targets Java 17 bytecode; only the snapshot data, the serializer table, and the tests change.
Why the 26.2 snapshot is not enough
EntityMetadataRegistry.resolveVersionthrows for a release newer than the newest bundled snapshot, andVirtualEntityresolves that version from the server release name. On Minecraft 26.3 every metadata-backed entity therefore failed before this change — 323 tests failed with that exact error, which is why a 26.3 snapshot is required rather than optional.The 26.2 and 26.3 layouts are not identical, so
26.3.jsonwas derived from the official artifact instead of copied. The full derivation, artifacts, hashes, and the validated method are documented indata/entity-data/README.md. Summary:SynchedEntityData.defineId→ClassTreeIdRegistry.define) over the Mojang-mapped server classes, reading each accessor's generic signature for itsdataTypeand thedefine(accessor, value)argument for itsdefaultValue.26.2.jsonbyte for byte from the official 26.2 artifact, so the same tooling produced26.3.json.26.2.json,26.3.jsondiffers in exactly two places: theEnderMan→Endermanclass rename (layout unchanged;normalize()resolves both spellings), and the newCushionentity with oneDyeColorCOLORfield at index 8 whoseDyeColor.WHITEdefault was recovered from the bytecode.EntityTyperegistry closure have identical layouts and superclass links.minecraft:poplar_boatandminecraft:poplar_chest_boatretarget the existingBoat/ChestBoatclasses, so they need no new entry.Cushionis reachable, not theoretical: PacketEvents 2.14.0 registersEntityTypes.CUSHION, andAllEntityMetadataSchemaTestresolves every registered PacketEvents entity type for every supported server version through 26.3.Keeping the snapshot under the daily sync
tools/sync-entity-data.shreinstallssrc/main/resources/entity-datafrom upstream on every run, and upstream still has no26.3document (https://kennytv.eu/entity-data/26.3.json→ 404). Without a change, the next scheduled run would have deleted the new snapshot and reverted 26.3 support. The sync now backs up the current snapshots, reinstalls upstream data, restores any snapshot that upstream does not publish, and reports what it preserved:Upstream's own document replaces the local copy as soon as it is published.
PacketEvents 2.14.0 harness fix
With 2.14.0 the whole suite died with
ExceptionInInitializerError→NullPointerException, becauseWrappedBlockState.loadMappings0now dereferencesPacketEvents.getAPI().getLogManager()while parsing built-in item component data.PacketEventsTestSupportsupplies a mockedLogManager. All 323 pre-existing failures were this plus the missing 26.3 snapshot.Verification
node tools/verify-entity-data.mjs src/main/resources/entity-data data/metadata-flags/semantic-flags.json→Verified 34 snapshots, 5065 entity-data classes, and 5846 declared fields./Verified 11 reviewed semantic metadata flags across every applicable snapshot../gradlew verifyGeneratedMetadataKeys→ passes (regeneratedGeneratedEntityMetadataKeyscontainsCushion.COLORtypedMetadataKey<DyeColor>viaEntityDataTypes.DYE_COLOR)../gradlew cleanTest test→ 19171 tests, 0 failures, 0 errors, 0 skipped (was 19170; +1 Cushion test). The two exhaustive matrices are the real cross-validation against PacketEvents 2.14.0 for 26.3:./gradlew build→ BUILD SUCCESSFUL (verifyEntityData+verifyGeneratedMetadataKeys+check)../tools/sync-entity-data.sh→ succeeds, reports the preserved snapshot, leaves26.3.jsonbyte-identical (sha256 verified), and the verifier still passes.26.3schema resolution (server release name -> bundled26.3snapshot), spawn, metadata, relative movement, inbound interaction, Text Display metadata, root-anchor relocation and the atomic packet bundle:{"entityId":2147483647,"type":"pig","customName":"VE_TEST_PIG","boostTime":10,"relativeMove":true, "attack":true,"textDisplay":"VE_TEST_TEXT","rootAnchorRelocation":true,"bundle":true}Bridged clients are disconnected by the 26.3 server's movement validation, so that harness suppresses client-side movement; no VirtualEntities scenario depends on it.
The Mineflayer fixture on 26.x
Running the fixture against 26.3 exposed a real coverage hole: Minecraft 26.1 moved entity attacks out of
ServerboundInteractPacketinto a dedicatedServerboundAttackPacket(int entityId), which PacketEvents exposes asPacketType.Play.Client.ATTACK/WrapperPlayClientAttack(INTERACT_ENTITYis-1for 1.21.11 and26for 26.1+;ATTACKis-1for 1.21.11 and1for 26.1+). The library already handles it throughVirtualEntityManager.handleInteraction(User, WrapperPlayClientAttack), but the fixture only listened forINTERACT_ENTITY, so attacks were never routed on 26.x. The fixture now handles both packet types, which makes the black-box attack assertion pass on 1.21.11 and 26.3 alike.Test changes
EntityMetadataRegistryTest: the "latest bundled snapshot" fixture moves to26.3,26.2and26.3must agree on theTEXT/TRANSLATIONindexes, and a new test assertsregistry.schema("26.3", EntityTypes.CUSHION)resolvesCOLORasMetadataField(8, "DyeColor", "COLOR", "DyeColor.WHITE").Notes
paper-api/Java targets) intentionally stays on Paper 1.21.11, the newest version the pinned Mineflayer can log in to. It is test scaffolding, not part of the published artifact.data/entity-data/README.mdrecords the provenance of every locally reviewed snapshot: artifacts, hashes, the validated derivation method, the resulting 26.3 delta, and the remaining uncertainty.Companion changes
Upgrades the same Minecraft version in the downstream consumers:
TWME-TW/TextDisplayShapesandTWME-TW/WorldEditDisplay. Both keep their currentv0.9.0pin in this round and will pick up the explicit 26.3 snapshot once this library is released.