|
| 1 | +# Playable Minecraft |
| 2 | + |
| 3 | +Select **Minecraft** in the theme picker, then **Play Minecraft** in the banner |
| 4 | +under the header. The game opens in a dialog and is imported only after the |
| 5 | +button is pressed; the dashboard, charts and data are unchanged. |
| 6 | + |
| 7 | +## What is in the game |
| 8 | + |
| 9 | +- Title screen with the rotating vanilla panorama, splash text, Singleplayer, |
| 10 | + Options and Quit. Singleplayer lists saved worlds (play, delete, create). |
| 11 | +- Create New World: name, seed (text seeds are hashed like vanilla), Survival or |
| 12 | + Creative, and Peaceful/Easy/Normal/Hard difficulty. |
| 13 | +- Infinite, seeded terrain in 16×16×128 chunks streamed around the player: |
| 14 | + plains, forest, birch forest, taiga, snowy, desert, mountains, ocean, beach |
| 15 | + and river biomes, caves, coal/iron/gold/redstone/lapis/diamond ores in |
| 16 | + depth bands, deepslate, bedrock, oak/birch/spruce trees, cacti, sugar cane, |
| 17 | + flowers, grass and lakes. The same seed always produces the same world. |
| 18 | +- 85 blocks and 149 items with the vanilla textures, 74 crafting recipes |
| 19 | + (2×2 inventory grid and 3×3 crafting table, shaped and shapeless, tag |
| 20 | + ingredients such as any planks) and 20 furnace recipes with fuel burn times. |
| 21 | +- Survival rules: vanilla mining times by hardness, tool kind and tier, |
| 22 | + harvest gating (stone needs a pickaxe, iron ore a stone pickaxe, diamond an |
| 23 | + iron pickaxe), tool durability, item drops and pickup, health, hunger, |
| 24 | + saturation and eating, fall, drowning, lava, fire, cactus and mob damage, |
| 25 | + death screen and respawn, and experience levels. |
| 26 | +- Creative: instant breaking, flight (double-tap Space), the creative item |
| 27 | + grid with search, and middle-click pick block. |
| 28 | +- Sky and sky-light and block-light (torches, glowstone, lava, furnaces) |
| 29 | + with smooth lighting and ambient occlusion, day/night cycle with sun, moon, |
| 30 | + stars and moving clouds, fog, flowing water and lava with source blocks, |
| 31 | + water + lava making obsidian/cobblestone, falling sand and gravel, crop |
| 32 | + growth, saplings growing into trees, TNT, doors, ladders, chests and furnaces. |
| 33 | +- Mobs with vanilla models and skins: zombies, skeletons (arrows) and creepers |
| 34 | + (explosions) spawn in the dark on Easy and above; pigs, cows, sheep (shearing |
| 35 | + and wool) and chickens spawn with the terrain and drop food. |
| 36 | +- HUD: hotbar, hearts, hunger, air bubbles, experience bar and level, held item |
| 37 | + name, chat, F3 debug screen, F1 hide HUD, F5 first-person/back/front camera |
| 38 | + with the player model. |
| 39 | +- Inventory, crafting table, furnace, chest and creative screens with vanilla |
| 40 | + slot behavior: left/right click, shift-click transfer, drag to split evenly |
| 41 | + or place one each, double-click collect, number keys to swap with the hotbar, |
| 42 | + Q to drop, and tooltips. |
| 43 | +- Chat commands: `/gamemode`, `/time`, `/tp`, `/give`, `/summon`, `/kill`, |
| 44 | + `/difficulty`, `/seed`, `/spawnpoint`, `/clear`, `/help`. |
| 45 | +- Options: FOV, render distance, mouse sensitivity, GUI scale, brightness, |
| 46 | + volume, view bobbing and clouds. Settings persist in |
| 47 | + `localStorage` (`inferencex-minecraft-options`). |
| 48 | +- Sounds from the vanilla asset index for digging, steps, mobs, explosions, |
| 49 | + doors, chests and UI clicks, gated by the theme's existing sound toggle. |
| 50 | + |
| 51 | +## Controls |
| 52 | + |
| 53 | +| Input | Action | |
| 54 | +| ----------------------- | ------------------------------------------------ | |
| 55 | +| Click the world | Capture the mouse | |
| 56 | +| Mouse | Look | |
| 57 | +| W A S D | Move | |
| 58 | +| Space | Jump; swim up; double-tap to fly in Creative | |
| 59 | +| Shift | Sneak; fly down | |
| 60 | +| R, Ctrl or double-tap W | Sprint | |
| 61 | +| Left click (hold) | Mine or attack | |
| 62 | +| Right click | Place, use, eat, open containers | |
| 63 | +| Middle click | Pick block | |
| 64 | +| 1-9 or wheel | Select hotbar slot | |
| 65 | +| E | Inventory | |
| 66 | +| Q | Drop item (Ctrl+Q drops the stack) | |
| 67 | +| T or / | Chat and commands | |
| 68 | +| F1 / F3 / F5 (or V) | Hide HUD / debug screen / camera | |
| 69 | +| Escape | Close a screen, pause; on the title screen, exit | |
| 70 | + |
| 71 | +Touch devices get a movement stick (push fully forward to sprint), a look area |
| 72 | +(drag to look, tap to place or use, hold to mine or attack), Jump and Sneak |
| 73 | +buttons, a tappable hotbar, and on-screen menu buttons. |
| 74 | + |
| 75 | +## Lifecycle |
| 76 | + |
| 77 | +- `MinecraftPlayBanner` (in `minecraft-theme.tsx`) renders the launcher and |
| 78 | + dynamically imports `components/minecraft/game/minecraft-game-dialog.tsx`. |
| 79 | + The game code, CSS, textures, models and sounds are not requested until the |
| 80 | + button is pressed. Light, dark and the other themes request none of it. |
| 81 | +- Worlds save to `localStorage` every 30 seconds, on pause, on Save and Quit, |
| 82 | + and when the dialog closes: the index is `inferencex-minecraft-worlds` and each |
| 83 | + world is `inferencex-minecraft-world-<id>`. Only edited blocks are stored |
| 84 | + (terrain regenerates from the seed), plus player state, inventory, entities, |
| 85 | + chests and furnaces. A full or disabled storage shows a chat warning. |
| 86 | +- Escape is routed through the game first: it closes open screens and toggles |
| 87 | + the pause menu while playing, and closes the dialog only from the title |
| 88 | + screen. Focus returns to the launcher. Closing stops the render loop, releases |
| 89 | + the pointer lock, disposes WebGL resources and removes listeners. |
| 90 | +- The world renders with three.js using a single texture atlas, per-chunk |
| 91 | + meshes with cutout and translucent passes, and a fixed 20 Hz simulation tick |
| 92 | + with render interpolation. |
| 93 | +- Embedded views hide the launcher, as with the other theme banners. |
| 94 | + |
| 95 | +## Source layout |
| 96 | + |
| 97 | +`packages/app/src/components/minecraft/game/`: |
| 98 | + |
| 99 | +| File | Responsibility | |
| 100 | +| -------------------- | ------------------------------------------------------------------ | |
| 101 | +| `mc-blocks.ts` | Block registry: textures, hardness, tools, light, shapes, sounds | |
| 102 | +| `mc-items.ts` | Items, tools, food, fuel, recipes, smelting and mining time | |
| 103 | +| `mc-noise.ts` | Seed hashing, PRNG and simplex noise | |
| 104 | +| `mc-world.ts` | Terrain generation, chunks, lighting and fluids | |
| 105 | +| `mc-physics.ts` | AABB collision, movement, raycasts | |
| 106 | +| `mc-game.ts` | Game rules, player, mobs, containers, commands, ticks | |
| 107 | +| `mc-mesher.ts` | Chunk meshing with smooth light and ambient occlusion | |
| 108 | +| `mc-models.ts` | Vanilla entity box models and poses | |
| 109 | +| `mc-renderer.ts` | three.js scene, sky, particles, entities, first/third person views | |
| 110 | +| `mc-audio.ts` | Sound playback | |
| 111 | +| `mc-save.ts` | World serialization and `localStorage` | |
| 112 | +| `mc-ui.tsx` | HUD, screens, item icons, buttons, sliders, panorama | |
| 113 | +| `minecraft-game.tsx` | Phases, menus, input, loop and overlays | |
| 114 | +| `mc-atlas.ts` | Generated atlas, icon and sound tables | |
| 115 | + |
| 116 | +`packages/app/scripts/build-minecraft-game-assets.py` rebuilds the atlases, GUI |
| 117 | +textures, panorama and sounds from a client jar, a 1.20.1 jar (classic entity |
| 118 | +skin layouts) and the launcher asset index. See |
| 119 | +`packages/app/public/decorative/minecraft/game/README.md` for provenance. |
| 120 | + |
| 121 | +## Data/API coverage exclusion |
| 122 | + |
| 123 | +This is an optional presentation feature with no new route or data view. It |
| 124 | +changes no benchmark filters, model selection, metrics, calculations, share |
| 125 | +parameters, or returned data. It therefore uses the presentation-only |
| 126 | +exclusion from API and `@semianalysisai/inferencex-skills` parity. |
| 127 | + |
| 128 | +## Verification |
| 129 | + |
| 130 | +- `mc-game.test.ts`: deterministic generation, bedrock and ores, lighting, |
| 131 | + crafting (shaped, shifted, shapeless, 3×3 only), smelting, vanilla mining |
| 132 | + times and harvest tiers, gravity and collision, raycasts, drops and pickup, |
| 133 | + placement, inventory clicks and drag distribution, furnace smelting, fluids |
| 134 | + and obsidian/cobblestone, fall damage, death and respawn, commands, mob |
| 135 | + determinism and save round trips. |
| 136 | +- `cypress/e2e/minecraft-game.cy.ts`: asset isolation on light and dark, launch |
| 137 | + from the theme, world creation, Escape to pause, Save and Quit, Escape closing |
| 138 | + the dialog with focus restored, and the Chinese mobile launcher. |
| 139 | +- Development builds expose `render_game_to_text()` and `mc_debug()`; production |
| 140 | + builds do not. |
0 commit comments