26.2#82
Conversation
📝 WalkthroughWalkthroughThe change updates Minecraft protocol schemas, typed identifiers, item and particle models, text component serialization, generator automation, ignore rules, and a documentation alias. ChangesProtocol model updates
Text component serialization
Generator and repository configuration
Documentation metadata
Estimated code review effort: 5 (Critical) | ~120 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winPlayer object fallback is dropped on serialize
Content::Objectacceptsfallbackfor both object variants, but thePlayerarm never writes it back out. Any fallback attached to a player object is silently lost on the next round-trip. Emitfallbackin 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
📒 Files selected for processing (19)
.gitignore.ignoregenerator/Datagen.javagenerator/datagen.shhaya_protocol/src/clientbound.rshaya_protocol/src/clientbound/common.rshaya_protocol/src/clientbound/game.rshaya_protocol/src/clientbound/login.rshaya_protocol/src/command.rshaya_protocol/src/entity_data.rshaya_protocol/src/game_event.rshaya_protocol/src/lib.rshaya_protocol/src/particle.rshaya_protocol/src/registry.rshaya_protocol/src/score.rshaya_protocol/src/serverbound.rshaya_protocol/src/serverbound/game.rshaya_text/src/chat.rshaya_text/src/profile.rs
💤 Files with no reviewable changes (3)
- .gitignore
- generator/datagen.sh
- generator/Datagen.java
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
📒 Files selected for processing (4)
haya_protocol/src/advancement.rshaya_protocol/src/crafting.rshaya_protocol/src/item_stack.rshaya_protocol/src/particle.rs
Summary by CodeRabbit