Skip to content

Conversation

@zardoy
Copy link
Owner

@zardoy zardoy commented Dec 6, 2025

Note

Replace internal three.js renderer with external minecraft-renderer, refactor imports and app/bootstrap, and update build/test configs while removing old viewer code.

  • Renderer:
    • Remove internal three.js renderer and related modules (renderer/viewer/three/**, panorama, item mesh, skybox, media, particles, waypoints, etc.).
    • Switch to external minecraft-renderer package; refactor imports throughout src/** to use it (viewer, utils, mesher, three methods, player state).
  • Build/Config:
    • Move shared RSBuild config to rsbuildSharedConfig.ts and update paths; copy mesher worker from node_modules.
    • Update rsbuild.config.ts, vitest root, and docker prepare script; remove renderer-specific adjustments.
  • App/Core:
    • Replace custom AppViewer with one from minecraft-renderer; add onAppViewerConfigUpdate and adjust initialization/loader logic.
    • Misc fixes: resource/asset loading, debug/menu hooks, and type/import cleanups.

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

Summary by CodeRabbit

  • Bug Fixes

    • Updated splash screen message.
  • Chores

    • Reorganized module imports to use external package references.
    • Removed development playground and testing infrastructure.
    • Simplified build configuration and dependency management.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

Walkthrough

Large-scale monorepo refactoring: removes the entire renderer/ package directory (playground, viewer, sign-renderer, build configs, and related modules), updates import paths in experiments to reference external minecraft-renderer package alias, updates workspace configuration and build scripts, and modifies splash text configuration. Effectively extracts renderer subsystems into an external package dependency.

Changes

Cohort / File(s) Summary
Monorepo & Workspace Configuration
pnpm-workspace.yaml, package.json
Removed renderer and renderer/viewer/sign-renderer/ from workspace packages; updated start scripts to remove mesher references; added minecraft-renderer dependency; removed renderer dependency; added build-single-file script; added @types/three override.
Experiment Import Path Updates
experiments/state.ts, experiments/three-fireworks.ts, experiments/three-item.ts, experiments/three-labels.ts
Changed import paths from relative local paths (e.g., ../renderer/viewer/...) to external module alias (minecraft-renderer/src/...).
Configuration & Build Files
config.json, renderer/buildMesherConfig.mjs, renderer/buildMesherWorker.mjs, renderer/rsbuild.config.ts, renderer/.npmrc, renderer/package.json
Updated splash text message; removed build mesher scripts, RSBuild configuration, and npm settings.
Playground & Scenes
renderer/playground/*, CONTRIBUTING.md
Removed entire playground subsystem (HTML, UI, scene implementations, debug tools); removed playground & Storybook documentation sections.
Renderer Viewer Core
renderer/viewer/baseGraphicsBackend.ts, renderer/viewer/common/utils.ts, renderer/viewer/.gitignore
Removed graphics backend state initialization and version utility functions; removed public directory ignore patterns.
Renderer Lib Utilities
renderer/viewer/lib/DebugGui.ts, renderer/viewer/lib/animationController.ts, renderer/viewer/lib/basePlayerState.ts, renderer/viewer/lib/cameraBobbing.ts, renderer/viewer/lib/cleanupDecorator.ts, renderer/viewer/lib/createPlayerObject.ts, renderer/viewer/lib/guiRenderer.ts, renderer/viewer/lib/skyLight.ts, renderer/viewer/lib/smoothSwitcher.ts, renderer/viewer/lib/simpleUtils.ts, renderer/viewer/lib/utils.ts, renderer/viewer/lib/utils/*
Removed UI debugger, animation controller, player state, camera bobbing, decorators, player object creation, GUI rendering, sky light calculations, smooth state transitions, and utility helpers.
Renderer Mesher Subsystem
renderer/viewer/lib/mesher/*
Removed entire mesher worker, models/geometry generation, world management, common utilities, standalone renderer, test infrastructure, and related constants.
Renderer World & Logging
renderer/viewer/lib/worldDataEmitter.ts, renderer/viewer/lib/worldrendererCommon.ts, renderer/viewer/lib/mesherlogReader.ts
Removed world data emission system, world renderer common base class, and mesher log replay functionality.
Renderer Three.js Components
renderer/viewer/three/appShared.ts, renderer/viewer/three/bannerRenderer.ts, renderer/viewer/three/cameraShake.ts, renderer/viewer/three/documentRenderer.ts, renderer/viewer/three/entities.ts, renderer/viewer/three/entity/*
Removed item UV resolution, banner rendering, camera shake effects, document/rendering pipeline, entity system, entity meshes, animations, armor models, and external entity model exports.
Sign Renderer Package
renderer/viewer/sign-renderer/*
Removed entire sign-renderer package including HTML, rendering logic, tests, and Vite configuration.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Areas requiring extra attention:

  • Verification of complete removal: Confirm all renderer/ directory contents are properly deleted and no orphaned references remain (especially in build configs and imports elsewhere in the codebase).
  • Import path correctness: Validate that all four experiments files (state.ts, three-fireworks.ts, three-item.ts, three-labels.ts) use correct module alias paths matching the external package structure.
  • Dependency alignment: Ensure minecraft-renderer package version and exports match the removed APIs (e.g., SmoothSwitcher, createWaypointSprite).
  • Build script consistency: Verify start, start2, and new build-single-file scripts work correctly without mesher/playground build targets.
  • Workspace integrity: Confirm pnpm-workspace.yaml changes don't break monorepo commands or dependency resolution.

Possibly related PRs

Suggested labels

refactor, monorepo, breaking-change, large-diff


🐰 Hop, hop, the renderer hops away!
Bundled tight, in a package today,
No more playgrounds, no more scenes,
Just clean imports and module machines!
The three-js realm grows lean—
Best refactor we've ever seen! 🎨✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'remove not needed renderer' accurately describes the main objective of deleting the entire renderer package and related playground/viewer code, though it could be more specific about the scope and context of the removal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch renderer-remove

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.

"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: Build script references removed build-other-workers script

The build and build-analyze scripts reference pnpm build-other-workers, but this PR removes the build-other-workers script definition (which was "echo NOT IMPLEMENTED"). Running pnpm build will now fail because the build-other-workers script no longer exists.

Fix in Cursor Fix in Web

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.

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