Control Minecraft with Python

Python scripting for Minecraft

Minescript is a platform for controlling and interacting with Minecraft using scripts written in the Python programming language.

v5.0Minescript 5.0 is now in beta.
Why Minescript

Extend the game with scripts

minescript.py

Python API

Functions for echo/chat, player position queries, block manipulation, inventory access, and entity detection.

Pyjinn

Integrated scripting

Includes Pyjinn, an interpreter that recognizes Python syntax and integrates deeply with Java programs.

\backslash

Run right from chat

Run scripts by typing a backslash (\) in chat, distinct from regular slash (/) commands.

Getting started

Run your first script in 3 steps

Install the mod

Download the mod from Modrinth or CurseForge. Supports Fabric and NeoForge; older versions support Forge.

Add your script

Put .py files in the minecraft/minescript folder.

Run from chat

Run from chat with a backslash, without the extension — e.g. \example

Pyjinn

Integrated scripting with Pyjinn

Pyjinn is an interpreter that recognizes Python syntax and integrates deeply with Java programs. It uses a “pidgin” language that looks and feels like Python while its implementation and runtime behavior are based in Java.

# Pyjinn — Python syntax, Java runtime from java.util import ArrayList items = ArrayList() items.add("diamond") items.add("emerald") for it in items: print(it)