Skip to main content

Fluent Python builders for Minecraft datapacks & resource packs — custom items, enchantments, mob AI, screen overlays, dialogs, worldgen — plus a headless pack simulator for testing without launching the game.

Project description

GemDP

Python builders for Minecraft data packs and resource packs.

Features

  • Custom items, tools, weapons & armor
  • Custom blocks & ores
  • Custom mobs
  • Fullscreen overlays
  • Book systems
  • Advanced events system
  • Event-driven AI for mobs
  • Projectiles & raycasting
  • Enchantments
  • Dialogs & triggers
  • NBT & storage
  • Testing with the mc_sim interpreter

Quick start

Install GemDP, then create a project with this layout:

my_pack/
├── first.py
└── assets/
    └── ruby.png

ruby.png can be any PNG; use 16×16 for a vanilla-style item texture.

pip install gemdp
from pathlib import Path
from gemdp import DataPack, ItemComponent, ResourcePack

ROOT = Path(__file__).resolve().parent
ASSETS = ROOT / "assets"

# Use different names: these become the data-pack and resource-pack folders.
dp = DataPack("ruby_dp", "Ruby demo data", "1.21.11")
rp = ResourcePack("ruby_rp", "Ruby demo resources", "1.21.11")

ruby = rp.add_custom_item(
    namespace="demo",
    item_id="minecraft:clock",
    custom_name="ruby",
    texture_path=str(ASSETS / "ruby.png"),
    datapack=dp,
    item_name={"text": "Ruby", "color": "red"},
    components=ItemComponent().max_stack_size(64).rarity("uncommon"),
)

print(ruby.get_give_command("@s"))
dp.build(ROOT / "out")
rp.build(ROOT / "out")

Install out/ruby_dp in a world's datapacks/ folder and enable out/ruby_rp from Minecraft's resource-pack screen. Then run /reload and use the printed /give command.

See Getting started for output-folder behavior and the exact install steps.

Examples

Ruby datapack

Full material set: ruby, ore, tools, sword, armor set, recipes.

examples/ruby_family/ruby_family.py

ruby items

Ore spawns underground in veins.

ruby ore

Steve mob datapack

Segmented display mob, keyframe animations, MobAI with patrol, hit reactions, and goal routing.

examples/steve_mob/steve_mob.py

steve mob

Rules Card

A datapack item that creates server rules at runtime.

examples/rules_card/rules_card.py

rules card rules card menu

More runnable examples are in examples/.

Docs

Start here

Build pack content

  • Custom items — items, components, recipes, tools, weapons, armor, and item events
  • Custom blocks — blocks, ores, block hooks, loot, and give commands
  • EventsEventApp, block, inventory, entity, and structure rules
  • Projectiles — hit hooks and firing from an item event
  • Conditions — reusable execute if fragments and predicates

Advanced systems and tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemdp-10.0.1.tar.gz (380.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemdp-10.0.1-py3-none-any.whl (302.0 kB view details)

Uploaded Python 3

File details

Details for the file gemdp-10.0.1.tar.gz.

File metadata

  • Download URL: gemdp-10.0.1.tar.gz
  • Upload date:
  • Size: 380.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for gemdp-10.0.1.tar.gz
Algorithm Hash digest
SHA256 fdb2af7f4f3f88bac2a8955afb17af20d9d834994a05dc02d81859ede4e61cc9
MD5 9dad114dcf6beeed02608e5f40b6d8f8
BLAKE2b-256 a89c5c1842bd7cb1bf37dcfc53da509c4da4dff98ebb29d7ad6ec854da65375c

See more details on using hashes here.

File details

Details for the file gemdp-10.0.1-py3-none-any.whl.

File metadata

  • Download URL: gemdp-10.0.1-py3-none-any.whl
  • Upload date:
  • Size: 302.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for gemdp-10.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb1abcbf2d4fea9809c31376cc1f6bf3eed20946f35b81c758c350a099db202
MD5 b0b6ca68d1b0c78e39ef62853724d1ed
BLAKE2b-256 7facb12cf1a5dfbd30fe748fc438a2ab8608f2bfea0252d85d928a73334ca959

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page