Skip to content

26.2#82

Merged
hayanesuru merged 10 commits into
mainfrom
26.2
Jul 14, 2026
Merged

26.2#82
hayanesuru merged 10 commits into
mainfrom
26.2

Conversation

@hayanesuru

@hayanesuru hayanesuru commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Documentation
    • Updated a generated-docs alias for block opacity terminology to improve discoverability.
  • Protocol Updates
    • Extended game protocol with new handlers/packets (game rule values, low-disk-space warning, attack, set game rule) and added/updated related payloads.
    • Introduced typed identifiers and new clock/network state types; updated login session_id handling.
    • Refined entity, chat, inventory/container input, scoring/team color, particles, and several item/advancement/crafting payload schemas (e.g., item stack templates).
  • New Features
    • Added additional particle types and improved chat component fallbacks and NBT plain/interpreting handling.
  • Chores
    • Removed datagen tooling/scripts and updated ignore configuration.

@hayanesuru hayanesuru changed the title data: bump 26.2 26.2 Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change updates Minecraft protocol schemas, typed identifiers, item and particle models, text component serialization, generator automation, ignore rules, and a documentation alias.

Changes

Protocol model updates

Layer / File(s) Summary
Protocol type foundations
haya_protocol/src/lib.rs, haya_protocol/src/registry.rs, haya_protocol/src/score.rs
Adds shared protocol types, renames ClickType, removes V32List, and types login session IDs as UUIDs.
Item and component models
haya_protocol/src/item_stack.rs, haya_protocol/src/crafting.rs, haya_protocol/src/advancement.rs
Adds ItemStackTemplate and updates item-containing payloads and typed data components.
Clientbound packet schemas
haya_protocol/src/clientbound/*
Adds game-rule and warning packets and updates entity, clock, team, tag, and login payloads.
Serverbound packet schemas
haya_protocol/src/serverbound/*
Adds attack, game-rule, and spectator messages and updates container and interaction payloads.
Dispatch and serializers
haya_protocol/src/clientbound.rs, haya_protocol/src/serverbound.rs, haya_protocol/src/command.rs, haya_protocol/src/entity_data.rs, haya_protocol/src/particle.rs, haya_protocol/src/game_event.rs
Wires packet callbacks and extends command, entity-data, particle, and entity-event models.
Serialization validation
haya_protocol/src/lib.rs
Updates login packet serialization tests for the UUID session identifier.

Text component serialization

Layer / File(s) Summary
Text content and profile models
haya_text/src/chat.rs, haya_text/src/profile.rs
Adds object fallbacks, NBT plain/interpreting state, and ResolvableProfile::new() with Default.
Text serialization and parsing
haya_text/src/chat.rs
Serializes and deserializes generic fallbacks and NBT flags, initializes object variants, and validates incompatible NBT modes.

Generator and repository configuration

Layer / File(s) Summary
Generator removal
generator/Datagen.java, generator/datagen.sh
Removes the Java data generator and its shell automation.
Ignore configuration
.gitignore, .ignore
Stops ignoring generator/server.jar and adds /Cargo.lock to .ignore.

Documentation metadata

Layer / File(s) Summary
Update doc alias
haya_data/src/lib.rs
Changes the block_state::opacity documentation alias to getLightDampening.

Estimated code review effort: 5 (Critical) | ~120 minutes

Poem

A bunny hops through packets bright,
With typed IDs tucked neat and right.
Text fallbacks bloom, old tools take flight,
New rules and clocks dance into sight.
“Good schemas!” cheers the rabbit tonight. 🐇

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 26.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
haya_text/src/chat.rs (1)

486-502: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Player object fallback is dropped on serialize
Content::Object accepts fallback for both object variants, but the Player arm never writes it back out. Any fallback attached to a player object is silently lost on the next round-trip. Emit fallback in the player branch too, or reject it during parse to keep the shape symmetric.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@haya_text/src/chat.rs` around lines 486 - 502, Preserve player object
fallbacks during serialization: in the ObjectInfo::Player arm of Content
serialization, add the same optional fallback serialization handled by the
ObjectInfo::Atlas arm, using FALLBACK_K and f.serialize().
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@haya_protocol/src/clientbound/game.rs`:
- Around line 553-556: Remove the online_mode field from the
ClientboundLoginPacket/Login struct, leaving common_player_spawn_info followed
directly by enforces_secure_chat so the serialized wire layout matches the
client decoder.

---

Outside diff comments:
In `@haya_text/src/chat.rs`:
- Around line 486-502: Preserve player object fallbacks during serialization: in
the ObjectInfo::Player arm of Content serialization, add the same optional
fallback serialization handled by the ObjectInfo::Atlas arm, using FALLBACK_K
and f.serialize().
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9a7d111a-fc90-430b-b849-6a0ab37e14a2

📥 Commits

Reviewing files that changed from the base of the PR and between f03ff7e and 4efbfe2.

📒 Files selected for processing (19)
  • .gitignore
  • .ignore
  • generator/Datagen.java
  • generator/datagen.sh
  • haya_protocol/src/clientbound.rs
  • haya_protocol/src/clientbound/common.rs
  • haya_protocol/src/clientbound/game.rs
  • haya_protocol/src/clientbound/login.rs
  • haya_protocol/src/command.rs
  • haya_protocol/src/entity_data.rs
  • haya_protocol/src/game_event.rs
  • haya_protocol/src/lib.rs
  • haya_protocol/src/particle.rs
  • haya_protocol/src/registry.rs
  • haya_protocol/src/score.rs
  • haya_protocol/src/serverbound.rs
  • haya_protocol/src/serverbound/game.rs
  • haya_text/src/chat.rs
  • haya_text/src/profile.rs
💤 Files with no reviewable changes (3)
  • .gitignore
  • generator/datagen.sh
  • generator/Datagen.java

Comment thread haya_protocol/src/clientbound/game.rs
@hayanesuru

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@haya_protocol/src/crafting.rs`:
- Around line 71-90: Update the recursive variants of SlotDisplay—WithAnyPotion,
OnlyWithComponent, and Dyed—to add indirection around their Cow<'a, Self>
fields, using Box as supported by mser. Preserve the existing variant data and
serialization behavior while ensuring SlotDisplay has a finite size and compiles
without E0072.

In `@haya_protocol/src/item_stack.rs`:
- Around line 48-54: Implement haya_nbt’s Serialize and Deserialize traits for
ItemStackTemplate, preferably by extending its derive attributes if supported;
otherwise add manual implementations matching the existing legacy ItemStack
behavior, including id, count, and components serialization.
- Line 566: Update ItemContainerContents.items to use a slot-based entry type
and codec rather than Option<ItemStackTemplate>. Each serialized entry must
include its slot index and item stack, while empty slots are omitted; define or
reuse the appropriate slot struct/codec and preserve the existing 256-entry
capacity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3e8b2331-2560-4617-9a4b-f3cd68c2be3f

📥 Commits

Reviewing files that changed from the base of the PR and between f3cc111 and e8b6d07.

📒 Files selected for processing (4)
  • haya_protocol/src/advancement.rs
  • haya_protocol/src/crafting.rs
  • haya_protocol/src/item_stack.rs
  • haya_protocol/src/particle.rs

Comment thread haya_protocol/src/crafting.rs
Comment thread haya_protocol/src/item_stack.rs
Comment thread haya_protocol/src/item_stack.rs
@hayanesuru
hayanesuru merged commit 163f8e2 into main Jul 14, 2026
2 checks passed
@hayanesuru
hayanesuru deleted the 26.2 branch July 14, 2026 04:25
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.

1 participant