Skip to content

Conversation

@zardoy
Copy link
Owner

@zardoy zardoy commented Dec 6, 2025

Note

Renderer migration to external package

  • Replace internal renderer/* usage with minecraft-renderer dependency; update imports across src/* and experiments/*
  • Rsbuild now copies worker files from node_modules/minecraft-renderer/dist and sets relevant defines; add @types/three override and deployAlwaysUpdate

Build/scripts cleanup

  • Simplify start/build scripts; remove mesher/playground watch/build tasks and renderer workspace link

Docs and minor UI copy

  • Trim CONTRIBUTING.md (remove playground/mesher/Storybook sections) and rename Cypress section
  • Update config.json splashText to "Mind the bugs and have fun!"

Written by Cursor Bugbot for commit 9dad872. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • Bug Fixes

    • Splash message changed to: "Mind the bugs and have fun!"
  • Documentation

    • Contributing guide trimmed (legacy playground/mesher/Storybook sections removed); Cypress heading renamed to "Cypress Tests (Browser Integration)".
  • Chores

    • Start/build scripts and workspace simplified; dependency entries consolidated.
  • Removed

    • Many playground pages, demo scenes, renderer/viewer subsystems, utilities, assets, and tests deleted.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Removed the in-repo renderer package and many renderer/viewer playground, mesher, viewer, and sign-renderer modules; replaced several local imports with minecraft-renderer; updated workspace and package scripts; changed config.json splashText and trimmed CONTRIBUTING.md headings.

Changes

Cohort / File(s) Summary
Workspace & Root Manifest
pnpm-workspace.yaml, package.json
Removed renderer workspace entries and related scripts; removed renderer dependency; added minecraft-renderer and @types/three; simplified start/build scripts and updated pnpm overrides and deployAlwaysUpdate.
Top-level config & docs
config.json, CONTRIBUTING.md
Updated splashText and removed Renderer/Playground/Mesher and Storybook sections; renamed Cypress heading to "Browser Integration".
Experiment imports
experiments/state.ts, experiments/three-fireworks.ts, experiments/three-item.ts, experiments/three-labels.ts
Switched imports from local ../renderer/... to minecraft-renderer/src/....
Renderer package metadata & build infra
renderer/package.json, renderer/.npmrc, renderer/rsbuild.config.ts, renderer/buildMesherConfig.mjs, renderer/buildMesherWorker.mjs
Deleted renderer package manifest, npmrc, rsbuild config and mesher build scripts/configs (build/watch orchestration removed).
Playground UI & scenes
renderer/playground/*, renderer/playground/scenes/*
Removed playground HTML, React UI, scene implementations, debug UIs, and scenes index exports.
Viewer: core & backend utilities
renderer/viewer/baseGraphicsBackend.ts, renderer/viewer/.gitignore, renderer/viewer/common/utils.ts
Removed default renderer state factory, .gitignore patterns, and version utility helpers.
Viewer: library utilities
renderer/viewer/lib/*, renderer/viewer/lib/utils/*
Removed many utility modules (DebugGui, animationController, basePlayerState, cameraBobbing, cleanupDecorator, createPlayerObject, guiRenderer, smoothSwitcher, simpleUtils, utils, proxy watcher, skins, newStats, etc.).
Mesher subsystem & tests
renderer/viewer/lib/mesher/*, renderer/viewer/lib/mesher/test/*
Removed mesher worker, models, geometry helpers, world class, standalone renderer, test harness and tests, and related constants/modules.
World & data emission
renderer/viewer/lib/worldDataEmitter.ts, renderer/viewer/lib/worldrendererCommon.ts, renderer/viewer/lib/mesherlogReader.ts
Deleted world data emitter, WorldRendererCommon base, mesher log reader and their public APIs.
Three.js viewer components & entities
renderer/viewer/three/*, renderer/viewer/three/entity/*
Removed item UV resolver, banner rendering, camera shake, document renderer, entities system, EntityMesh and animations, armor models, exported models and external textures.
Sign-renderer package
renderer/viewer/sign-renderer/*
Deleted sign-renderer HTML, TS sources, noop, tests, package.json and Vite config.
Assets & generated data
renderer/viewer/lib/moreBlockDataGenerated.json, renderer/viewer/three/entity/armorModels.json, renderer/viewer/three/entity/externalTextures.json
Removed generated asset and JSON data files.

Sequence Diagram(s)

(No sequence diagrams generated — changes are deletions/module moves rather than a new multi-component control flow.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Suggested labels

Review effort 4/5

"🐰
I hopped through files both big and small,
Packed up the renderer and boxed it all,
Exports gone, imports now point anew,
A leaner tree where old code flew —
Nibble the crumbs, rebuild with cheer!"

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'remove not needed renderer' is vague and generic, failing to convey the substantive refactoring of migrating renderer functionality to an external package. Consider a more descriptive title such as 'Migrate renderer to external minecraft-renderer package' to better communicate the scope and intent of the changes.
✅ 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.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch renderer-remove

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0ac9a45 and 9dad872.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • src/sounds/botSoundSystem.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ 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: Cursor Bugbot

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.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 29

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

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: 0

🧹 Nitpick comments (2)
CONTRIBUTING.md (1)

46-54: Align unit-test docs with renderer removal

The heading rename on Line 46 looks good, but the unit tests section still says:

Location of unit tests: **/*.test.ts files in src folder and renderer folder.

Given the renderer package/folder is being removed in this PR, this sentence is now stale and may confuse contributors. Consider updating it to only mention the actual test locations.

package.json (1)

8-9: Scripts and renderer dependency wiring look coherent; consider small cleanup

  • The updated start / start2 scripts and the addition of the minecraft-renderer dependency (with three / @types/three pinned via devDeps + overrides) are consistent with the new imports in experiments/*. No issues from a manifest perspective.
  • Minor nit: the eslint script on Line 23 still globs renderer even though that package/folder is removed in this PR. It’s harmless but a bit misleading; you might want to drop renderer from the glob in a follow-up for clarity.
-    "lint": "eslint \"{src,cypress,renderer}/**/*.{ts,js,jsx,tsx}\"",
+    "lint": "eslint \"{src,cypress}/**/*.{ts,js,jsx,tsx}\"",

Please re-run your usual pnpm lint / dev build to confirm the new minecraft-renderer dependency and its /src/... subpath imports resolve as expected in your environment.

Also applies to: 23-23, 84-85, 132-132, 197-197

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 007782b and 52b99ca.

⛔ Files ignored due to path filters (39)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • renderer/viewer/three/entity/models/allay.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/arrow.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/axolotl.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/blaze.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/boat.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/camel.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/cat.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/chicken.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/cod.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/creeper.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/dolphin.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/ender_dragon.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/enderman.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/endermite.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/fox.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/frog.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/ghast.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/goat.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/guardian.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/horse.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/llama.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/minecart.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/parrot.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/piglin.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/pillager.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/rabbit.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/sheep.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/shulker.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/sniffer.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/spider.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/tadpole.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/turtle.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/vex.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/villager.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/warden.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/witch.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/wolf.obj is excluded by !**/*.obj
  • renderer/viewer/three/entity/models/zombie_villager.obj is excluded by !**/*.obj
📒 Files selected for processing (81)
  • CONTRIBUTING.md (1 hunks)
  • config.json (1 hunks)
  • experiments/state.ts (1 hunks)
  • experiments/three-fireworks.ts (1 hunks)
  • experiments/three-item.ts (1 hunks)
  • experiments/three-labels.ts (1 hunks)
  • package.json (3 hunks)
  • pnpm-workspace.yaml (0 hunks)
  • renderer/.npmrc (0 hunks)
  • renderer/buildMesherConfig.mjs (0 hunks)
  • renderer/buildMesherWorker.mjs (0 hunks)
  • renderer/package.json (0 hunks)
  • renderer/playground.html (0 hunks)
  • renderer/playground/allEntitiesDebug.ts (0 hunks)
  • renderer/playground/baseScene.ts (0 hunks)
  • renderer/playground/playground.ts (0 hunks)
  • renderer/playground/playgroundUi.tsx (0 hunks)
  • renderer/playground/scenes/allEntities.ts (0 hunks)
  • renderer/playground/scenes/entities.ts (0 hunks)
  • renderer/playground/scenes/floorRandom.ts (0 hunks)
  • renderer/playground/scenes/frequentUpdates.ts (0 hunks)
  • renderer/playground/scenes/geometryExport.ts (0 hunks)
  • renderer/playground/scenes/index.ts (0 hunks)
  • renderer/playground/scenes/lightingStarfield.ts (0 hunks)
  • renderer/playground/scenes/main.ts (0 hunks)
  • renderer/playground/scenes/railsCobweb.ts (0 hunks)
  • renderer/playground/scenes/rotationIssue.ts (0 hunks)
  • renderer/playground/scenes/slabsOptimization.ts (0 hunks)
  • renderer/playground/scenes/transparencyIssue.ts (0 hunks)
  • renderer/playground/shared.ts (0 hunks)
  • renderer/rsbuild.config.ts (0 hunks)
  • renderer/viewer/.gitignore (0 hunks)
  • renderer/viewer/baseGraphicsBackend.ts (0 hunks)
  • renderer/viewer/common/utils.ts (0 hunks)
  • renderer/viewer/lib/DebugGui.ts (0 hunks)
  • renderer/viewer/lib/animationController.ts (0 hunks)
  • renderer/viewer/lib/basePlayerState.ts (0 hunks)
  • renderer/viewer/lib/cameraBobbing.ts (0 hunks)
  • renderer/viewer/lib/cleanupDecorator.ts (0 hunks)
  • renderer/viewer/lib/createPlayerObject.ts (0 hunks)
  • renderer/viewer/lib/guiRenderer.ts (0 hunks)
  • renderer/viewer/lib/mesher/mesher.ts (0 hunks)
  • renderer/viewer/lib/mesher/models.ts (0 hunks)
  • renderer/viewer/lib/mesher/modelsGeometryCommon.ts (0 hunks)
  • renderer/viewer/lib/mesher/shared.ts (0 hunks)
  • renderer/viewer/lib/mesher/standaloneRenderer.ts (0 hunks)
  • renderer/viewer/lib/mesher/test/mesherTester.ts (0 hunks)
  • renderer/viewer/lib/mesher/test/playground.ts (0 hunks)
  • renderer/viewer/lib/mesher/test/tests.test.ts (0 hunks)
  • renderer/viewer/lib/mesher/world.ts (0 hunks)
  • renderer/viewer/lib/mesher/worldConstants.ts (0 hunks)
  • renderer/viewer/lib/mesherlogReader.ts (0 hunks)
  • renderer/viewer/lib/moreBlockDataGenerated.json (0 hunks)
  • renderer/viewer/lib/simpleUtils.ts (0 hunks)
  • renderer/viewer/lib/skyLight.ts (0 hunks)
  • renderer/viewer/lib/smoothSwitcher.ts (0 hunks)
  • renderer/viewer/lib/ui/newStats.ts (0 hunks)
  • renderer/viewer/lib/utils.ts (0 hunks)
  • renderer/viewer/lib/utils/proxy.ts (0 hunks)
  • renderer/viewer/lib/utils/skins.ts (0 hunks)
  • renderer/viewer/lib/workerProxy.ts (0 hunks)
  • renderer/viewer/lib/worldDataEmitter.ts (0 hunks)
  • renderer/viewer/lib/worldrendererCommon.ts (0 hunks)
  • renderer/viewer/sign-renderer/index.html (0 hunks)
  • renderer/viewer/sign-renderer/index.ts (0 hunks)
  • renderer/viewer/sign-renderer/noop.js (0 hunks)
  • renderer/viewer/sign-renderer/package.json (0 hunks)
  • renderer/viewer/sign-renderer/playground.ts (0 hunks)
  • renderer/viewer/sign-renderer/tests.test.ts (0 hunks)
  • renderer/viewer/sign-renderer/vite.config.ts (0 hunks)
  • renderer/viewer/three/appShared.ts (0 hunks)
  • renderer/viewer/three/bannerRenderer.ts (0 hunks)
  • renderer/viewer/three/cameraShake.ts (0 hunks)
  • renderer/viewer/three/documentRenderer.ts (0 hunks)
  • renderer/viewer/three/entities.ts (0 hunks)
  • renderer/viewer/three/entity/EntityMesh.ts (0 hunks)
  • renderer/viewer/three/entity/animations.js (0 hunks)
  • renderer/viewer/three/entity/armorModels.json (0 hunks)
  • renderer/viewer/three/entity/armorModels.ts (0 hunks)
  • renderer/viewer/three/entity/exportedModels.js (0 hunks)
  • renderer/viewer/three/entity/externalTextures.json (0 hunks)
💤 Files with no reviewable changes (74)
  • renderer/package.json
  • renderer/viewer/lib/cleanupDecorator.ts
  • renderer/buildMesherConfig.mjs
  • renderer/viewer/baseGraphicsBackend.ts
  • renderer/playground/allEntitiesDebug.ts
  • renderer/viewer/lib/mesher/worldConstants.ts
  • renderer/viewer/sign-renderer/noop.js
  • renderer/viewer/lib/mesher/test/playground.ts
  • renderer/viewer/lib/mesher/test/mesherTester.ts
  • renderer/playground/scenes/allEntities.ts
  • renderer/viewer/lib/animationController.ts
  • renderer/viewer/common/utils.ts
  • renderer/viewer/three/documentRenderer.ts
  • renderer/viewer/lib/smoothSwitcher.ts
  • renderer/playground/scenes/geometryExport.ts
  • renderer/viewer/three/entity/armorModels.json
  • renderer/playground/scenes/index.ts
  • renderer/viewer/lib/simpleUtils.ts
  • renderer/viewer/lib/workerProxy.ts
  • renderer/playground/scenes/railsCobweb.ts
  • renderer/playground/playground.ts
  • renderer/.npmrc
  • renderer/playground/scenes/rotationIssue.ts
  • renderer/viewer/sign-renderer/vite.config.ts
  • renderer/viewer/lib/mesher/mesher.ts
  • renderer/viewer/lib/moreBlockDataGenerated.json
  • renderer/viewer/three/entity/EntityMesh.ts
  • renderer/playground.html
  • renderer/buildMesherWorker.mjs
  • renderer/playground/scenes/main.ts
  • renderer/viewer/lib/DebugGui.ts
  • renderer/viewer/three/appShared.ts
  • renderer/playground/scenes/entities.ts
  • renderer/viewer/lib/mesher/models.ts
  • renderer/playground/scenes/frequentUpdates.ts
  • pnpm-workspace.yaml
  • renderer/viewer/three/bannerRenderer.ts
  • renderer/viewer/lib/mesher/modelsGeometryCommon.ts
  • renderer/viewer/lib/mesherlogReader.ts
  • renderer/viewer/lib/basePlayerState.ts
  • renderer/viewer/lib/mesher/shared.ts
  • renderer/viewer/lib/guiRenderer.ts
  • renderer/viewer/three/entity/externalTextures.json
  • renderer/viewer/three/entity/armorModels.ts
  • renderer/viewer/lib/createPlayerObject.ts
  • renderer/viewer/sign-renderer/package.json
  • renderer/viewer/three/entity/animations.js
  • renderer/viewer/lib/utils.ts
  • renderer/viewer/sign-renderer/index.html
  • renderer/rsbuild.config.ts
  • renderer/viewer/lib/mesher/world.ts
  • renderer/viewer/three/cameraShake.ts
  • renderer/viewer/sign-renderer/tests.test.ts
  • renderer/playground/playgroundUi.tsx
  • renderer/viewer/lib/mesher/standaloneRenderer.ts
  • renderer/playground/scenes/transparencyIssue.ts
  • renderer/viewer/lib/mesher/test/tests.test.ts
  • renderer/viewer/three/entities.ts
  • renderer/viewer/sign-renderer/playground.ts
  • renderer/viewer/lib/worldrendererCommon.ts
  • renderer/viewer/lib/skyLight.ts
  • renderer/playground/scenes/slabsOptimization.ts
  • renderer/viewer/lib/utils/skins.ts
  • renderer/viewer/lib/utils/proxy.ts
  • renderer/viewer/.gitignore
  • renderer/viewer/lib/worldDataEmitter.ts
  • renderer/viewer/lib/ui/newStats.ts
  • renderer/playground/scenes/lightingStarfield.ts
  • renderer/playground/shared.ts
  • renderer/viewer/lib/cameraBobbing.ts
  • renderer/playground/scenes/floorRandom.ts
  • renderer/viewer/three/entity/exportedModels.js
  • renderer/playground/baseScene.ts
  • renderer/viewer/sign-renderer/index.ts
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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
Repo: zardoy/minecraft-web-client PR: 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.
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : Do not use the global variable `bot` directly in any file under the `renderer/` directory or its subfolders (e.g., `renderer/viewer/three/worldrendererThree.ts`).
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : In renderer code (such as in `WorldRendererThree`), use the `playerState` property (e.g., `worldRenderer.playerState.gameMode`) to access player state. The implementation for `playerState` lives in `src/mineflayer/playerState.ts`.

Applied to files:

  • experiments/state.ts
  • experiments/three-labels.ts
  • CONTRIBUTING.md
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : In renderer code, all bot/player state and events must be accessed via explicit interfaces, state managers, or passed-in objects, never by referencing `bot` directly.

Applied to files:

  • experiments/state.ts
📚 Learning: 2025-06-23T13:33:14.776Z
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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:

  • experiments/state.ts
  • experiments/three-fireworks.ts
  • experiments/three-item.ts
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : Do not use the global variable `bot` directly in any file under the `renderer/` directory or its subfolders (e.g., `renderer/viewer/three/worldrendererThree.ts`).

Applied to files:

  • experiments/state.ts
  • experiments/three-fireworks.ts
  • experiments/three-item.ts
  • CONTRIBUTING.md
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to src/**/*.ts : In `src/` code, you may use the global variable `appViewer` from `src/appViewer.ts` directly. Do not import `appViewer` or use `window.appViewer`; use the global `appViewer` variable as-is.

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to src/**/*.ts : You may use the global variable `bot` directly in any file under the `src/` directory (e.g., `src/mineflayer/playerState.ts`).

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-07-10T16:03:10.838Z
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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:

  • package.json
⏰ 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: Cursor Bugbot
🔇 Additional comments (5)
config.json (1)

34-35: Splash text copy change is fine

Pure text update on Line 34, JSON structure unchanged and consistent with existing keys.

experiments/three-labels.ts (1)

3-3: Import rewire to shared renderer utility looks good

The import on Line 3 now points at the shared waypointSprite util from the external renderer package; no other behavior change in this file. As long as that subpath is exported by the package, this aligns with the rest of the PR.

Please run the experiments build (Vite config) to confirm the bundler resolves minecraft-renderer/src/three/waypointSprite correctly.

experiments/three-item.ts (1)

4-4: Externalizing itemMesh import is consistent with the new renderer package

The switch to importing createItemMeshFromCanvas / createItemMesh from the external renderer module keeps the existing call sites intact, so runtime behavior should remain the same if the API surface matches.

Double-check that the minecraft-renderer version you pinned actually exports src/three/itemMesh with the same function signatures used here.

experiments/three-fireworks.ts (1)

3-3: Fireworks manager import migration matches renderer extraction

Repointing FireworksManager to the external renderer package on Line 3 keeps the surrounding usage identical and aligns with the rest of the refactor.

Please confirm that minecraft-renderer exposes src/three/fireworks and that the experiments build runs without module resolution errors.

experiments/state.ts (1)

1-1: SmoothSwitcher import source change is straightforward

Importing SmoothSwitcher from the shared renderer package on Line 1 is consistent with the rest of the PR; the usage pattern in this experiment remains unchanged.

After bumping the import, ensure this experiment still runs and that minecraft-renderer/src/lib/smoothSwitcher is present in the installed package.

"start": "run-p dev-proxy dev-rsbuild watch-mesher",
"start2": "run-p dev-rsbuild watch-mesher",
"start": "run-p dev-proxy dev-rsbuild",
"start2": "run-p dev-rsbuild",
Copy link

Choose a reason for hiding this comment

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

Bug: Lint script references removed renderer folder

The lint script includes renderer in its glob pattern {src,cypress,renderer}/**/*.{ts,js,jsx,tsx}, but the renderer folder and its link:renderer devDependency were removed in this commit. Running pnpm lint may fail or behave unexpectedly when trying to lint a non-existent directory.

Fix in Cursor Fix in Web

@zardoy
Copy link
Owner Author

zardoy commented Dec 11, 2025

/deploy

@zardoy
Copy link
Owner Author

zardoy commented Dec 11, 2025

/deploy

@zardoy
Copy link
Owner Author

zardoy commented Dec 11, 2025

/deploy

@github-actions
Copy link

Deployed to Vercel Preview: https://prismarine-nsbivvjet-zaro.vercel.app
Playground
Storybook

@zardoy
Copy link
Owner Author

zardoy commented Dec 12, 2025

/deploy

@github-actions
Copy link

Deployed to Vercel Preview: https://prismarine-jvekojf8w-zaro.vercel.app
Playground
Storybook

@zardoy
Copy link
Owner Author

zardoy commented Dec 26, 2025

/deploy

@github-actions
Copy link

Deployed to Vercel Preview: https://prismarine-nd0wuvude-zaro.vercel.app
Playground
Storybook

zardoy and others added 2 commits December 26, 2025 09:50
…sables

Three.js BufferAttribute reading index 0 from a null array error in console, which is exactly what happens when a geometry attribute array gets nulled on the CPU side. Fix on minecraft-renderer for removing cpu disposables
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: 0

Caution

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

⚠️ Outside diff range comments (1)
package.json (1)

1-1: Regenerate lockfile to resolve pipeline failure.

The pipeline reports a mismatch between package.json and the lockfile. After the dependency changes (adding minecraft-renderer, @types/three, and removing renderer), you need to regenerate the lockfile.

Run:

pnpm install

Then commit the updated pnpm-lock.yaml.

♻️ Duplicate comments (2)
package.json (2)

23-23: Remove renderer from lint glob pattern.

The lint script still includes renderer in its file glob, but the renderer folder was removed in this PR.

🔎 Proposed fix
-    "lint": "eslint \"{src,cypress,renderer}/**/*.{ts,js,jsx,tsx}\"",
+    "lint": "eslint \"{src,cypress}/**/*.{ts,js,jsx,tsx}\"",

12-12: Remove reference to deleted build-other-workers script.

The build-analyze script still chains pnpm build-other-workers, which no longer exists. This will cause the command to fail.

🔎 Proposed fix
-    "build-analyze": "BUNDLE_ANALYZE=true rsbuild build && pnpm build-other-workers",
+    "build-analyze": "BUNDLE_ANALYZE=true rsbuild build",
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b61ccb9 and a8cf4db.

📒 Files selected for processing (8)
  • package.json
  • src/defaultOptions.ts
  • src/index.ts
  • src/mineflayer/playerState.ts
  • src/optionsGuiScheme.tsx
  • src/react/AllSettingsEditor.tsx
  • src/react/MainMenu.tsx
  • src/react/OverlayModelViewer.tsx
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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.
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : Do not use the global variable `bot` directly in any file under the `renderer/` directory or its subfolders (e.g., `renderer/viewer/three/worldrendererThree.ts`).
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : In renderer code (such as in `WorldRendererThree`), use the `playerState` property (e.g., `worldRenderer.playerState.gameMode`) to access player state. The implementation for `playerState` lives in `src/mineflayer/playerState.ts`.
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : In renderer code, all bot/player state and events must be accessed via explicit interfaces, state managers, or passed-in objects, never by referencing `bot` directly.
📚 Learning: 2025-07-27T13:24:58.186Z
Learnt from: CR
Repo: zardoy/minecraft-web-client PR: 0
File: .cursor/rules/vars-usage.mdc:0-0
Timestamp: 2025-07-27T13:24:58.186Z
Learning: Applies to renderer/**/*.ts : Do not use the global variable `bot` directly in any file under the `renderer/` directory or its subfolders (e.g., `renderer/viewer/three/worldrendererThree.ts`).

Applied to files:

  • package.json
📚 Learning: 2025-06-23T13:33:14.776Z
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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:

  • package.json
📚 Learning: 2025-07-10T16:03:10.838Z
Learnt from: zardoy
Repo: zardoy/minecraft-web-client PR: 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:

  • package.json
🪛 GitHub Actions: CI
package.json

[error] 1-1: Lockfile and dependencies mismatch detected during install. The lockfile specs do not match the declared dependencies in package.json.

🔇 Additional comments (4)
package.json (4)

8-9: LGTM! Streamlined start scripts.

The removal of watch-mesher from both start scripts aligns well with the migration to the external minecraft-renderer package.


11-11: LGTM! Simplified build command.

Removing build-other-workers streamlines the build process appropriately.


132-132: LGTM! Type definitions correctly aligned.

The @types/three@0.154.0 addition in both devDependencies and overrides properly matches the three@0.154.0 version, ensuring consistent type definitions across the project and its dependencies.

Also applies to: 197-197


84-84: Package verified: minecraft-renderer@0.1.12 is available on npm with no known security vulnerabilities.

The package exists with 13 published versions, is MIT-licensed, and maintained at https://github.com/zardoy/minecraft-renderer. No public security advisories found in Snyk or npm listings.

ensures that options are watched after worldView is available.
@zardoy
Copy link
Owner Author

zardoy commented Dec 26, 2025

/deploy

@github-actions
Copy link

Deployed to Vercel Preview: https://prismarine-l2yapk480-zaro.vercel.app
Playground
Storybook

@zardoy
Copy link
Owner Author

zardoy commented Dec 28, 2025

/deploy

@github-actions
Copy link

Deployed to Vercel Preview: https://prismarine-3io4c802b-zaro.vercel.app
Playground
Storybook

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.

3 participants