{"id":28380529,"url":"https://github.com/context-labs/minecraft-ai","last_synced_at":"2025-06-24T21:31:26.359Z","repository":{"id":280196540,"uuid":"941263624","full_name":"context-labs/minecraft-ai","owner":"context-labs","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-05T06:24:28.000Z","size":3882,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T03:34:21.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/context-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-01T21:47:41.000Z","updated_at":"2025-05-11T17:09:48.000Z","dependencies_parsed_at":"2025-03-01T22:36:31.973Z","dependency_job_id":null,"html_url":"https://github.com/context-labs/minecraft-ai","commit_stats":null,"previous_names":["context-labs/minecraft-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/context-labs/minecraft-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Fminecraft-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Fminecraft-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Fminecraft-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Fminecraft-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/context-labs","download_url":"https://codeload.github.com/context-labs/minecraft-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/context-labs%2Fminecraft-ai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261759100,"owners_count":23205496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-30T03:08:43.078Z","updated_at":"2025-06-24T21:31:26.350Z","avatar_url":"https://github.com/context-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Clone with Three.js\n\nA voxel-based Minecraft clone built using Three.js and TypeScript. View demo [here](https://x.com/0xSamHogan/status/1895954338876703115).\n\n![Minecraft Clone Screenshot](/public/images/demo.png)\n\n## Features\n\n- Procedurally generated terrain with different biomes\n- Block breaking and placement\n- Player movement with collision detection\n- Different block types (grass, dirt, stone, wood, leaves, etc.)\n- Basic physics (gravity, jumping)\n- First-person camera controls\n- Hotbar for block selection\n- Debug information display\n- Lighting system with shadows\n\n## Prerequisites\n\n- [Bun](https://bun.sh/) (recommended)\n- Modern web browser with WebGL support\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/context-labs/minecraft-ai\ncd minecraft-ai\n```\n\n2. Install dependencies:\n```bash\nbun install\n# or\nnpm install\n```\n\n## Running the Game\n\n1. Build and start the server:\n```bash\nbun start\n```\nThis command will build the project and start the server.\n\n2. Open your browser and navigate to `http://localhost:3000`\n\n## Development\n\nFor development with hot reloading:\n\n```bash\nbun dev\n```\nThis will start the development server with automatic reloading when files change.\n\nTo build the project without starting the server:\n\n```bash\nbun build\n```\n\nTo generate the texture atlas:\n\n```bash\nbun generate-textures\n```\n\n## Project Structure\n\n```\nminecraft-clone/\n├── dist/                  # Compiled output\n├── public/                # Static assets\n│   └── textures/          # Game textures\n│       └── atlas.png      # Texture atlas\n├── src/\n│   ├── player/            # Player-related code\n│   │   └── Player.ts      # Player controller\n│   ├── ui/                # User interface\n│   │   └── DebugUI.ts     # Debug information display\n│   ├── utils/             # Utility functions\n│   │   ├── TextureManager.ts         # Texture management\n│   │   └── TextureAtlasGenerator.ts  # Texture atlas generator\n│   └── world/             # World generation and management\n│       ├── Block.ts       # Block definitions\n│       ├── Chunk.ts       # Chunk management\n│       └── World.ts       # World generation\n├── index.html             # Main HTML file\n├── index.ts               # Entry point\n├── server.ts              # Development server\n├── build.ts               # Build script\n├── package.json           # Project configuration\n└── README.md              # Project documentation\n```\n\n## Controls\n\n- **WASD**: Move\n- **Space**: Jump\n- **Mouse**: Look around\n- **Left Click**: Break block\n- **Right Click**: Place block\n- **1-6 Keys**: Select block type\n- **Mouse Wheel**: Cycle through block types\n- **ESC**: Release mouse pointer\n\n## How It Works\n\nThe game is built using the following components:\n\n- **World**: Manages chunks and terrain generation\n- **Chunk**: Represents a 16x16x16 section of blocks\n- **Block**: Defines different block types and their properties\n- **Player**: Handles player movement and interaction\n- **TextureManager**: Manages block textures and UV mapping\n- **DebugUI**: Displays debug information\n\n## Technical Notes\n\n- The project uses Three.js for 3D rendering\n- Custom PointerLockControls implementation for camera control\n- Optimized chunk rendering with geometry instancing\n- Collision detection for player movement\n- Raycasting for block selection and interaction\n\n## Performance Considerations\n\n- Chunks are only rendered when visible\n- Only visible faces of blocks are rendered\n- Chunks are loaded/unloaded based on player position\n- Frustum culling is used to avoid rendering off-screen objects\n\n## Future Improvements\n\n- Multiplayer support\n- Inventory system\n- Crafting\n- More block types\n- Day/night cycle\n- Mobs and creatures\n- Saving/loading worlds\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontext-labs%2Fminecraft-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontext-labs%2Fminecraft-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontext-labs%2Fminecraft-ai/lists"}