Skip to content

Support Minecraft 26.3 - #344

Open
Travja wants to merge 1 commit into
devfrom
claude/adoring-thompson-74lawm
Open

Travja wants to merge 1 commit into
devfrom
claude/adoring-thompson-74lawm

Conversation

@Travja

@Travja Travja commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds support for Minecraft 26.3.

  • Codex bump: codex.version → 1.2.0-R0.7-SNAPSHOT, the first build that recognises 26.3 (as Version.V26_R2). MIN_CORE_VERSION is raised to match.
  • New V26_R2 packet handler: PacketManager looks up the handler class by Version.CURRENT.name(). Without a V26_R2 class, packet handling would be silently skipped on 26.3.
  • Particle packet is now a record: 26.3 changed ClientboundLevelParticlesPacket to a Java record. The accessors were renamed (getParticle()/getCount() → particle()/count()), and reflective writes to record fields throw IllegalAccessException. So the damage-indicator particle cap (max 20) would have failed and printed a stack trace on every hit. V26_R2 reads the record accessors, builds a copy of the packet with the capped count through its canonical constructor, and swaps it in with EnginePacketEvent#setPacket. Codex sends whatever packet is on the event after dispatch.
  • V26_R1 hooks: V26_R1 now exposes getParticle/getParticleCount/setParticleCount as overridable hooks. Behaviour on 26.1/26.2 is unchanged.

All other reflected members are identical between the vanilla 26.2 and 26.3 server jars, so they needed no changes. Those are the equipment/attribute/entity-data packets, ServerLevel#getEntity(int), MinecraftServer#getAllLevels, EquipmentSlot#byName, Registry#getKey, Identifier#getPath and BuiltInRegistries.PARTICLE_TYPE.

Testing

  • mvn -U test passes: 43 tests, 0 failures, 2 skipped.
  • Record-copy logic was checked against a sample record. The 26.3 canonical constructor signature was checked with javap against the vanilla 26.3 server jar.
  • Not yet tested on a live 26.3 server.

Known issue (not addressed here)

On all of 26.1–26.3, V26_R1#manageEntityNames writes to SynchedEntityData$DataValue.value, and DataValue is also a record. So the entity-names visibility mode likely has no effect on 26.x and logs a stack trace on every entity-data packet. That should be fixed in a follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AGio1LrsF6DKSa3La6Hh7o


Generated by Claude Code

- Bump Codex to 1.2.0-R0.7-SNAPSHOT, the first build that recognises 26.3
  (as Version.V26_R2), and raise MIN_CORE_VERSION to match.
- Add a V26_R2 packet handler. Without it, PacketManager finds no class
  for V26_R2 and silently skips packet handling on 26.3.
- 26.3 turned ClientboundLevelParticlesPacket into a record, so
  getParticle()/getCount() became particle()/count() and the final count
  field can no longer be set reflectively. V26_R2 reads the record
  accessors and swaps in a copy of the packet with the capped count via
  EnginePacketEvent#setPacket. V26_R1 now exposes these steps as
  overridable hooks; its 26.1/26.2 behaviour is unchanged.

The other reflected packets and members (equipment, attributes, entity
data, ServerLevel/MinecraftServer lookups) are unchanged between the
vanilla 26.2 and 26.3 server jars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AGio1LrsF6DKSa3La6Hh7o

This branch has not been deployed

No deployments
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.

2 participants