Create a genuinely playable Minecraft-like first-person game in a single index.html in the current directory. Use global Three.js r128 from cdnjs and no modules or other assets. Write the file directly; do not print its source in chat.
Reliability matters more than scope. Use a deterministic 16x16 world and individual cube meshes with shared geometries/materials. Keep total block count modest. Include grass, dirt, stone, sand, wood, leaves, hills, and a few trees. The player must spawn visibly above solid ground facing across the terrain.
Implement click-to-start pointer lock, mouse look, WASD relative to yaw, gravity, jump, axis-separated player collision, respawn, crosshair, 1-7 hotbar, raycast target outline, left-click mining, and right-click placement. Store integer block coordinates in mesh.userData and calculate placement as hit block coordinate plus the transformed hit-face normal. Prevent placing inside the player. Do not infer block coordinates by subtracting and flooring mesh positions.
Before finishing, syntax-check the inline JavaScript and manually audit initialization order, spawn height, raycast coordinates, placement on all six faces, and undefined variables. Finish only after index.html exists; reply with a short note.