Skip to content

Conversation

CitralFlo
Copy link
Member

@CitralFlo CitralFlo commented Mar 10, 2025

Description

Please provide a brief summary of the changes made in this PR. Include references to any related issues or discussions,
if relevant.

Example: "This PR resolves issue #10. The issue addressed..."

What kind of change does this PR introduce? (Check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build related changes
  • Documentation code
  • Other, please describe:

Make sure your PR fulfills these requirements:

  • Tests for the changes have been added (where possible)
  • Documentation (README.md, CONTRIBUTING.md) has been updated, if needed
  • All new and existing tests have passed

Other Information

Please provide any additional information that you think may be relevant to this PR.

Checklist

By submitting this PR, you confirm that you have completed the following:

  • I have read and understand the CONTRIBUTING Guide
  • I have checked that no existing PRs fulfill my requirements and appear to be duplicates
  • The PR title follows the guidelines defined in the contributing guide
  • All tests pass locally with my changes (if applicable)
  • I have performed a self-review of my own code

Copy link

coderabbitai bot commented Mar 10, 2025

Walkthrough

This pull request updates the Minecraft server configuration in the build file by changing the version from "1.20.4" to "1.21.4". In addition, it enhances the legacy color formatting support. A new pattern for hexadecimal color codes, HEX_COLOR_PATTERN, is added to match strings with an &x prefix followed by color codes. The conversion logic in the legacyToAdventure method is updated to handle this new format and convert it into a standardized format. A new unit test, testLegacyHexToAdventure, is included to verify that the conversion accurately transforms the legacy hex color codes. No changes were made to the public API declarations aside from these additions.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e26289 and 445c9e2.

📒 Files selected for processing (3)
  • build.gradle.kts (1 hunks)
  • chatformatter-core/src/main/java/com/eternalcode/formatter/legacy/Legacy.java (2 hunks)
  • chatformatter-core/src/test/java/com/eternalcode/formatter/legacy/LegacyTest.java (1 hunks)
🔇 Additional comments (5)
build.gradle.kts (1)

88-88:

✅ Verification successful

Check if this is a valid Minecraft version

The Minecraft version has been updated to "1.21.4", but this version number doesn't appear to be released yet. As of early 2024, Minecraft had only reached version 1.20.x.


🌐 Web query:

What is the latest version of Minecraft Java Edition in 2025?

💡 Result:

The latest version of Minecraft: Java Edition as of March 2025 is 1.21.4, known as The Garden Awakens, released on December 3, 2024[3][8]. This update introduced features like the Pale Garden biome, new pig variants (warm and cold pigs), wildflowers, and leaf litter blocks[2][4].

Upcoming Version: Spring Drop 2025 (1.21.5)

Mojang is currently developing the next update, tentatively titled Spring Drop 2025 (assumed version 1.21.5), with planned features including:

  • Cow variants (temperature-based biome spawns)[12].
  • Ambient desert sounds and dancing firefly particles[12].
  • New bush plant blocks and expanded leaf particle effects[12][7].
  • Technical additions like hexadecimal/binary number support in commands and new entity/item tags[4].

The Spring Drop is expected to release around March 25, 2025, based on snapshot testing timelines[2][4]. Mojang will reveal more details during Minecraft LIVE 2025 on March 22, 2025[14].

Version History Recap (2024–2025)

Version Name Release Date Key Features
1.21.4 The Garden Awakens Dec 3, 2024 Pale Garden biome, pig variants[2][8]
1.21.3 Bundles of Bravery Oct 23, 2024 New combat items, wolf variants[2][8]
1.21 (Tricky Trials) Jun 13, 2024 Trial Chambers, breeze mob[8]

For multiplayer compatibility, ensure your launcher and OS are updated, as older systems (e.g., macOS versions below 10.15) will lose support after March 2025[9].

Citations:


Minecraft version check passed – the current version "1.21.4" is valid as of March 2025.

No changes are needed in the build.gradle.kts file.

chatformatter-core/src/test/java/com/eternalcode/formatter/legacy/LegacyTest.java (1)

53-61: Good test coverage addition!

This new test verifies the legacy hex color formatting used in plugins like HexNicks. It appropriately tests the conversion from the legacy format to Adventure's format.

chatformatter-core/src/main/java/com/eternalcode/formatter/legacy/Legacy.java (3)

22-22: Pattern for hex colors looks good

This new pattern will match hex colors in the format &x&c&c&d&d&7&7, which is used by some plugins.


100-104: Nice implementation of hex color conversion

The code now handles the additional hex color format by extracting each hex digit and combining them into the standard format.


99-109:

❓ Verification inconclusive

Verify color conversion is working as expected

The changes correctly support both hex formats, but it would be good to verify that they don't interfere with each other in complex strings.


🏁 Script executed:

#!/bin/bash
# Find any other tests that might be affected by these changes
rg -l "Legacy.legacyToAdventure" --type java

Length of output: 206


Color Conversion Verification

  • The update in Legacy.legacyToAdventure now supports both hex formats.
  • We found references in both LegacyTest.java and ChatHandlerImpl.java. Please double-check that the tests in LegacyTest.java include cases with complex strings (i.e., strings combining both formats) to ensure the conversions don't interfere with each other.
✨ 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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@CitralFlo CitralFlo changed the title Legacy color upgrade GH-140 Bump run server version to 1.21.4 and add old legacy hex color transformers Mar 10, 2025
@CitralFlo CitralFlo merged commit 0afd12d into master Mar 10, 2025
0 of 4 checks passed
@vLuckyyy vLuckyyy deleted the legacy-color-upgrade branch March 10, 2025 20:02
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