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.2.tar.gz (382.4 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.2-py3-none-any.whl (303.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gemdp-10.0.2.tar.gz
  • Upload date:
  • Size: 382.4 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.2.tar.gz
Algorithm Hash digest
SHA256 52442140e9eb70dd62df5a8493e8409ea38d6c1dd06f98069aeed74d15a592d7
MD5 bbe7d1a0d8159163d735d4f2eda4f8d3
BLAKE2b-256 ac676b18d67ba56ff1b9094cdf1f18f40b40ce8e9de3e93d041e2fe09ae7d221

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gemdp-10.0.2-py3-none-any.whl
  • Upload date:
  • Size: 303.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b7c8196cd839aa0e4401cc0529def1c7ff0bd637dc37429332fef7b56523bff
MD5 422607988805c46973e1ba23d5507f03
BLAKE2b-256 9d75ad57bb225dec37e8034a1839e625e68796dd203fe8cd06b21062678cfe11

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