Skip to main content

Overview

This guide will help you set up your development environment to build and contribute to Minecraft Community Edition.

Prerequisites

Required Tools

Before you begin, ensure you have the following installed:
  • Visual Studio (2015 or later recommended)
  • Windows SDK (for platform-specific development)
  • Git (for version control)

Platform-Specific Requirements

The project includes platform-specific builds:
  • Durango: Xbox-specific development tools
  • Windows: Standard Windows development environment
The solution file MinecraftConsoles.sln contains the main project configuration.

Setup Instructions

1

Clone the repository

Clone the Minecraft Community Edition repository to your local machine:
git clone <repository-url>
cd <repository-directory>
2

Open the solution

Open MinecraftConsoles.sln in Visual Studio. This solution contains two main projects:
  • Minecraft.Client - Client-side code and rendering
  • Minecraft.World - Game logic, world generation, and entities
3

Configure build settings

Select your target platform and configuration:
  • Configuration: Debug or Release
  • Platform: Choose based on your target platform
For initial development, use Debug configuration for better debugging capabilities.
4

Restore dependencies

Visual Studio should automatically restore any required dependencies. If not, right-click the solution and select “Restore NuGet Packages” (if applicable).
5

Build the project

Build the solution:
  • Press Ctrl+Shift+B or
  • Select Build > Build Solution from the menu
The build should complete without errors.
6

Verify the setup

Ensure the build completes successfully with:
  • No build errors
  • No warnings (our CI checks for this)
  • All projects built successfully

Project Structure

Understanding the project structure:
Minecraft Community Edition/
├── Minecraft.Client/          # Client code
│   ├── Common/               # Shared client code
│   ├── Durango/              # Xbox-specific code
│   └── *.cpp, *.h            # Client implementation
├── Minecraft.World/          # Game engine
│   ├── net.minecraft.world.* # Java-style namespaced headers
│   ├── entities/             # Entity implementations
│   ├── tiles/                # Block/tile implementations
│   └── *.cpp, *.h            # World implementation
└── MinecraftConsoles.sln     # Visual Studio solution

IDE Configuration

Visual Studio Settings

Recommended Visual Studio settings:
  1. Editor:
    • Tab size: 4 spaces (tabs, not spaces)
    • Enable line numbers
    • Enable code folding
  2. Build:
    • Enable parallel build
    • Treat warnings as errors: No (but avoid introducing new warnings)
  3. Debugging:
    • Enable Just My Code debugging
    • Set working directory to appropriate platform output

Extensions (Optional)

Consider installing these Visual Studio extensions:
  • Visual Assist (for better C++ IntelliSense)
  • Resharper C++ (for code analysis)
  • CodeMaid (for code cleanup)

Common Issues

Build Errors

If you encounter build errors:
  1. Ensure you have the correct Windows SDK installed
  2. Check that all project dependencies are available
  3. Clean the solution (Build > Clean Solution) and rebuild
  4. Verify your Visual Studio version is compatible

Missing Headers

If you see missing header errors:
  1. Check that all include paths are correctly configured
  2. Verify platform-specific SDKs are installed
  3. Ensure the stdafx.h precompiled header is building correctly

Platform-Specific Issues

For Durango (Xbox) builds:
  1. Install the Xbox development SDK
  2. Configure the appropriate development kit
  3. Set up the correct deployment target

Next Steps

Once your environment is set up:
  1. Review the Code Style Guide
  2. Familiarize yourself with the codebase
  3. Read the Pull Request Process
  4. Start contributing!

Build docs developers (and LLMs) love