Skip to content

Conversation

@Bram1903
Copy link
Collaborator

@Bram1903 Bram1903 commented Jan 20, 2026

  • Added: AvatarMeta
  • Changed: PlayerMeta to extend AvatarMeta

Summary by CodeRabbit

  • New Features

    • Added avatar customization capabilities including cape, jacket, sleeves, legs, and hat configuration options.
  • Refactor

    • Restructured player metadata handling to support avatar-specific features through a new metadata layer.
  • Chores

    • Updated version to 3.1.0.
    • Updated Gradle build tool to version 8.8.

✏️ Tip: You can customize this high-level summary in your review settings.

Changed: PlayerMeta extends AvatarMeta
@Bram1903 Bram1903 requested a review from Tofaa2 January 20, 2026 12:23
@Bram1903 Bram1903 self-assigned this Jan 20, 2026
@Bram1903 Bram1903 added the enhancement New feature or request label Jan 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a new AvatarMeta class to manage avatar appearance bits (cape, jacket, sleeves, legs, hat, right-hand main) and updates PlayerMeta to extend AvatarMeta, moving feature logic up the hierarchy and adjusting metadata offsets.

Changes

Cohort / File(s) Summary
New Avatar metadata class
api/src/main/java/me/tofaa/entitylib/meta/types/AvatarMeta.java
New class AvatarMeta extends LivingEntityMeta; adds public OFFSET/MAX_OFFSET, bitmask constants for avatar features, constructor, and getters/setters for each feature with version-aware reads/writes and bitwise metadata manipulation.
Player metadata refactor
api/src/main/java/me/tofaa/entitylib/meta/types/PlayerMeta.java
PlayerMeta now extends AvatarMeta (was LivingEntityMeta); removes duplicate avatar feature methods; updates OFFSET/MAX_OFFSET derivation; remaps shoulder data offsets to offset(OFFSET, 2)/offset(OFFSET, 3) and adds ServerVersion.V_1_11 guards.
Build version bump & wrapper
build.gradle.kts
Increments fullVersion from "3.0.3" to "3.1.0" and adds a Gradle wrapper task configured with gradleVersion = "8.8" and distributionType = Wrapper.DistributionType.ALL.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • Tofaa2

Poem

🐰 A hop through code, I nibble the bits,
New Avatar rules and shifted offsets sit,
Methods climbed up where siblings belong,
Player and Avatar now sing one song,
Hooray for tidy metadata — carrot-toast! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title refers to version support (1.21.9+) but the actual changes involve refactoring entity metadata classes by extracting avatar-related features into a new AvatarMeta class and reorganizing PlayerMeta to extend it. Consider a more specific title that reflects the primary technical change, such as 'refactor: Extract avatar metadata into separate AvatarMeta class' or 'feat: Add AvatarMeta base class for shared avatar properties'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

# Conflicts:
#	build.gradle.kts
@Bram1903 Bram1903 merged commit f0318e2 into master Jan 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants