Minecraft 9
By Just Sparrow
Based on the following code

Minecraft 8
Just Sparrow
9 views · 7h ago
About
This project is a recreate of Minecraft 8 — built by clicking "Recreate" and giving Claude (by Anthropic) a bug fix prompt. This time, no new features were added — instead, two bugs from the previous version were identified and fixed. The inverted mouse yaw direction has been corrected, and terrain faces no longer flicker after removing blocks. Sometimes improving a project means making what's already there work better.
Prompt Used
Fix the following two bugs in this Minecraft HTML file: Bug 1: Inverted mouse yaw direction In the mousemove event handler, player.yaw -= e.movementX * SENSITIVITY causes the camera to rotate left when the mouse moves right. Change -= to += so that mouse-right rotates camera-right, matching standard FPS controls. Bug 2: Terrain faces flicker / disappear after removing blocks When blocks are removed underground, exposed faces on neighboring blocks flicker on and off depending on camera angle. The cause is that rebuildFaceIM updates im.count and the instance matrix buffer, but never recalculates the InstancedMesh bounding volume. Three.js frustum culling uses the stale (larger) bounding box from before the rebuild, so the entire InstancedMesh gets incorrectly culled at certain camera angles. Fix this by adding im.computeBoundingBox() and im.computeBoundingSphere() right after setting im.instanceMatrix.needsUpdate = true in the rebuildFaceIM function.
How to Use
Getting Started
- Click the canvas to lock your cursor and start playing
- Press Escape to release the cursor
Movement
- W — Move forward
- A — Move left
- S — Move backward
- D — Move right
- Space — Jump
Camera
- Move your mouse to look around (while pointer lock is active)
- Mouse direction now correctly matches camera rotation
Block Selection
- Click an inventory slot at the bottom of the screen, or press 1 (Grass), 2 (Dirt), 3 (Stone), 4 (Wood)
Building & Breaking
- Left-click to place the selected block type
- Right-click to remove a block
- A crosshair in the center of the screen shows where you're aiming
Want to take it further? Click "Recreate" to build on this version — try adding fog, a skybox, or ambient sounds!
More
If you enjoyed this, please hit the like button and subscribe! Your support helps us create more cool stuff on Coddie.
Loading comments...
Other Codes
No other codes yet