Skip to content

Conversation

lucgei231
Copy link

@lucgei231 lucgei231 commented Aug 2, 2025

I noticed that there was a few non updated things in the README (such as that it said that it supported servers up to 1.21.4 when it actually supported up to 1.21.7.) Just a few minor updates.

Summary by CodeRabbit

  • New Features

    • Error messages are now logged to the console by default for improved visibility.
  • Style

    • Updated the background color of the main page to blueviolet.
  • Documentation

    • Updated the README with improved descriptions, new demo links, and extended supported server version information.

Copy link

coderabbitai bot commented Aug 2, 2025

Walkthrough

The changes include a minor whitespace addition to the .npmrc file, several documentation updates and corrections in the README file, and two small adjustments in index.html: the default error logging behavior now logs errors to the console, and the HTML background color has been changed to blueviolet.

Changes

Cohort / File(s) Change Summary
Configuration Whitespace
.npmrc
Added a single trailing whitespace line at the end of the file.
Documentation Updates
README.MD
Updated header (likely a typo), clarified multiplayer support, updated demo URLs, and extended supported server versions. Minor formatting and wording changes.
UI and Error Handling
index.html
Changed onError function’s log default to true (logs errors by default), and set HTML background color to blueviolet.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Browser
    participant onError Function

    User->>Browser: Interacts with page
    Browser->>onError Function: Triggers error event
    onError Function-->>Browser: Logs error to console by default (log=true)
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A brush of violet paints the sky,
README tales now clarify.
Errors whisper, "See me too,"
While npmrc waves adieu.
Small tweaks, a gentle hop—
The code grows strong with every stop!
🐇💜

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
.npmrc (1)

4-4: Remove superfluous trailing whitespace

The last line now contains a single space. Although harmless functionally, it introduces needless diff noise and may trigger lint checks in stricter CI setups.

-shell-emulator=true
- 
+shell-emulator=true
+
index.html (2)

48-51: Log errors with console.error (and drop redundant arg)

  1. Defaulting log = true means every captured error prints a stack trace in production, which is fine, but use console.error so it shows up in browser error filters and preserves formatting.
  2. Both global listeners still pass true, which is now redundant.
-const onError = (errorOrMessage, log = true) => {
+const onError = (errorOrMessage, log = true) => {
   let message = errorOrMessage instanceof Error ? (errorOrMessage.stack ?? errorOrMessage.message) : errorOrMessage
-  if (log) console.log(message)
+  if (log) console.error(message)

Optionally drop the explicit true in the two listener callbacks for brevity.


127-129: Hard-coded background colour may clash with theme variables

blueviolet is burned into the stylesheet. Consider referencing a CSS custom property (var(--background-colour)) or class so theming/dark-mode toggles don’t require editing core HTML.

No code change required if theming is out-of-scope.

README.MD (1)

13-13: Typo: “device-compatiiblity” → “device compatibility”

-aimed for *device-compatiiblity* and better performance...
+aimed for *device compatibility* and better performance...
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 67855ae and 7d334c6.

📒 Files selected for processing (3)
  • .npmrc (1 hunks)
  • README.MD (2 hunks)
  • index.html (2 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: zardoy
PR: zardoy/minecraft-web-client#373
File: renderer/viewer/three/entities.ts:1120-1120
Timestamp: 2025-06-23T13:33:14.776Z
Learning: In the minecraft-web-client project, team information for entities should be inlined into entity update events from the world data emitter rather than accessing the global bot object from renderer code. This maintains better separation of concerns between the data layer and renderer.
Learnt from: zardoy
PR: zardoy/minecraft-web-client#373
File: renderer/viewer/three/entities.ts:1120-1120
Timestamp: 2025-06-23T13:33:14.776Z
Learning: In the minecraft-web-client project, files under renderer/ directory must not access the global `bot` variable directly according to .cursor/rules/vars-usage.mdc. The updateNameTagVisibility method in renderer/viewer/three/entities.ts currently violates this rule by accessing bot.teamMap and bot.username. Team information should be passed through entity update events from the world data emitter instead.
📚 Learning: in the minecraft-web-client project, team information for entities should be inlined into entity upd...
Learnt from: zardoy
PR: zardoy/minecraft-web-client#373
File: renderer/viewer/three/entities.ts:1120-1120
Timestamp: 2025-06-23T13:33:14.776Z
Learning: In the minecraft-web-client project, team information for entities should be inlined into entity update events from the world data emitter rather than accessing the global bot object from renderer code. This maintains better separation of concerns between the data layer and renderer.

Applied to files:

  • README.MD
📚 Learning: in the minecraft-web-client project, files under renderer/ directory must not access the global `bot...
Learnt from: zardoy
PR: zardoy/minecraft-web-client#373
File: renderer/viewer/three/entities.ts:1120-1120
Timestamp: 2025-06-23T13:33:14.776Z
Learning: In the minecraft-web-client project, files under renderer/ directory must not access the global `bot` variable directly according to .cursor/rules/vars-usage.mdc. The updateNameTagVisibility method in renderer/viewer/three/entities.ts currently violates this rule by accessing bot.teamMap and bot.username. Team information should be passed through entity update events from the world data emitter instead.

Applied to files:

  • README.MD
📚 Learning: the minecraft-web-client project uses core-js auto polyfill injection, which means newer javascript ...
Learnt from: zardoy
PR: zardoy/minecraft-web-client#391
File: renderer/viewer/three/threeJsUtils.ts:56-56
Timestamp: 2025-07-10T16:03:10.838Z
Learning: The minecraft-web-client project uses core-js auto polyfill injection, which means newer JavaScript features like Promise.withResolvers() are automatically polyfilled for compatibility across different environments.

Applied to files:

  • README.MD
📚 Learning: in the minecraft web client project, custom thenable objects are preferred over real promises in per...
Learnt from: zardoy
PR: zardoy/minecraft-web-client#319
File: renderer/viewer/lib/workerProxy.ts:61-73
Timestamp: 2025-04-12T00:33:34.518Z
Learning: In the Minecraft web client project, custom thenable objects are preferred over real Promises in performance-critical code paths (like worker communication) because they avoid creating unnecessary Promise objects and event listeners when results aren't awaited.

Applied to files:

  • README.MD
📚 Learning: for the minecraft web client, the developer has explicitly decided against encrypting authenticateda...
Learnt from: zardoy
PR: zardoy/minecraft-web-client#310
File: src/react/appStorageProvider.ts:38-39
Timestamp: 2025-03-14T17:16:50.962Z
Learning: For the Minecraft web client, the developer has explicitly decided against encrypting authenticatedAccounts in localStorage due to the inherent limitations of client-side encryption (where to securely store the encryption key) and the practical reality that determined attackers could break it anyway.

Applied to files:

  • README.MD
🪛 LanguageTool
README.MD

[style] ~13-~13: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...le, flexible and lightweight. It's also a very strong example on how to build true HTML games...

(EN_WEAK_ADJECTIVE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-and-deploy
🔇 Additional comments (1)
README.MD (1)

59-64: Synchronise “First-class versions” with supported range

You expanded support to 1.21.7, but the first-class list still tops out at 1.21.4. Either add 1.21.7 here or clarify why it’s excluded.

@@ -1,14 +1,16 @@
# Minecraft Web Client
0# Minecraft Web Client
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix header: stray leading 0

Markdown will render 0# literally; replace with a single #.

-0# Minecraft Web Client
+# Minecraft Web Client
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
0# Minecraft Web Client
# Minecraft Web Client
🤖 Prompt for AI Agents
In README.MD at line 1, the header starts with a stray leading '0' before the
'#' character, causing incorrect Markdown rendering. Remove the leading '0' so
the line begins with a single '#' to correctly format it as a header.

Comment on lines +7 to +8
Unlike most other PrismarineJS clients, this client allows you to use single player and multi-player inside single player worlds (similar to [Essential Mod](https://essential.gg)

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Close the parenthesis after the Essential Mod link

The sentence opens a ( but never closes it.

-Unlike most other PrismarineJS clients, this client allows you to use single player and multi-player inside single player worlds (similar to [Essential Mod](https://essential.gg)
+Unlike most other PrismarineJS clients, this client allows you to use single-player and multi-player inside single-player worlds (similar to [Essential Mod](https://essential.gg))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Unlike most other PrismarineJS clients, this client allows you to use single player and multi-player inside single player worlds (similar to [Essential Mod](https://essential.gg)
Unlike most other PrismarineJS clients, this client allows you to use single-player and multi-player inside single-player worlds (similar to [Essential Mod](https://essential.gg))
🤖 Prompt for AI Agents
In README.MD around lines 7 to 8, the sentence containing the Essential Mod link
opens a parenthesis but does not close it. Add a closing parenthesis ')'
immediately after the link URL to properly close the parenthesis and fix the
sentence syntax.

You can try this out at [mcraft.fun](https://mcraft.fun/), [pcm.gg](https://pcm.gg) (short link), [mcon.vercel.app](https://mcon.vercel.app/) or the GitHub pages deploy. Every commit from the default (`develop`) branch is deployed to [s.mcraft.fun](https://s.mcraft.fun/) and [s.pcm.gg](https://s.pcm.gg/) - so it's usually newer, but might be less stable.
Unlike most other PrismarineJS clients, this client allows you to use single player and multi-player inside single player worlds (similar to [Essential Mod](https://essential.gg)

You can try this out at [mcraft.fun](https://mcraft.fun/), [pcm.gg](https://pcm.gg) (short link), [mcon.vercel.app](https://mcon.vercel.app/) or [the GitHub pages deploy](https://zarody.github.io/minecraft-web-client). Every commit from the default (`develop`) branch is deployed to [s.mcraft.fun](https://s.mcraft.fun/) and [s.pcm.gg](https://s.pcm.gg/) - so it's usually newer, but might be less stable.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Broken GitHub Pages URL

zarody.github.io is miss-spelled; should be zardoy.github.io.

-... or [the GitHub pages deploy](https://zarody.github.io/minecraft-web-client).
+... or [the GitHub Pages deploy](https://zardoy.github.io/minecraft-web-client).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
You can try this out at [mcraft.fun](https://mcraft.fun/), [pcm.gg](https://pcm.gg) (short link), [mcon.vercel.app](https://mcon.vercel.app/) or [the GitHub pages deploy](https://zarody.github.io/minecraft-web-client). Every commit from the default (`develop`) branch is deployed to [s.mcraft.fun](https://s.mcraft.fun/) and [s.pcm.gg](https://s.pcm.gg/) - so it's usually newer, but might be less stable.
You can try this out at [mcraft.fun](https://mcraft.fun/), [pcm.gg](https://pcm.gg) (short link), [mcon.vercel.app](https://mcon.vercel.app/) or [the GitHub Pages deploy](https://zardoy.github.io/minecraft-web-client). Every commit from the default (`develop`) branch is deployed to [s.mcraft.fun](https://s.mcraft.fun/) and [s.pcm.gg](https://s.pcm.gg/) - so it's usually newer, but might be less stable.
🤖 Prompt for AI Agents
In README.MD at line 9, the GitHub Pages URL is misspelled as
"zarody.github.io". Correct the URL to "zardoy.github.io" to fix the broken
link.

@zardoy
Copy link
Owner

zardoy commented Aug 2, 2025

This is not true, you can't connect to minecraft servers running only 1.21.5 or later

@zardoy zardoy closed this Aug 7, 2025
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