Skip to content

MattCollingwood/Python-Minecraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Python-Minecraft 🧱

A Python project that integrates with Minecraft (or mimics Minecraft mechanics) — build, modify, and explore a blocky world programmatically using Python.


Table of Contents


About

This project allows you to interact with a Minecraft-like environment using Python. You can create blocks, build structures, and implement logic or automation via scripts. Depending on your setup, it may use a game engine (e.g., Ursina), or connect to a running Minecraft server or modded environment.


Features

  • Programmatically place, remove, and modify blocks
  • Simple world generation (flat, random, or custom)
  • Player-like control (or AI) for exploring / building
  • Scriptable building — write Python scripts to automate constructions
  • (Optional) Real-time integration with a Minecraft server / mod

Getting Started

Prerequisites

  • Python 3.x
  • Any game engine or library you're using (e.g., ursina)
  • (If applicable) A running Minecraft server or a mod that supports scripting

Installation

  1. Clone the repo:
    git clone https://github.com/MattCollingwood/Python-Minecraft.git
    cd Python-Minecraft```
    
  2. Create a virtual environment (recommended):
python3 -m venv venv  
source venv/bin/activate  # On Windows: `venv\Scripts\activate`

Install dependencies:

pip install -r requirements.txt

Usage

Depending on how your project is built, usage will vary. Here are some common patterns: Run the main script:

python main.py

Execute a building script:

python scripts/build_house.py

Interact with the world: Use the provided Python API to place / remove blocks, move an entity, or run procedural generation code.

Controls / API

If you have user controls (keyboard / mouse), document them here. For example:

Control	Action
W, A, S, D	Move forward, left, back, right
Mouse	Look around / rotate camera
Left Click	Place block
Right Click	Remove block

Project Structure

Python-Minecraft/
│
├── assets/               # Textures, models, or other resources (if used)  
├── scripts/              # Python scripts for building / automation  
│   └── build_house.py  
├── world/                # (Optional) save data, chunk definitions, etc.  
├── main.py               # Entry point  
├── minecraft_api.py      # Code for interacting with Minecraft / world  
├── requirements.txt      # Python dependencies  
└── README.md             # This file  

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Created a Minecraft style game using python and pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages