Python library for easy creation of Minecraft datapacks
Project description
MCpypack
- Create Minecraft Datapacks easily using Python
⚠️ Early Development: This project is still in early development. Features may change and bugs may occur.
Features
- Easy datapack creation
- Namespaces
- Recipes
Installation
pip intall MCpypack
Example
from MCpypack import *
# Create a new datapack
pack = Datapack(name="useful_recipes", description='Adds useful recipes like GOD Apple and grass blocks', version='1.21.10')
# Create a new namespace
ns1 = Namespace('recipes')
# Add recipes to the namespace
ns1.add_recipes(
Smelting("burning_gundpowder", Item.GUNPOWDER, SimpleResult(Item.FIRE_CHARGE), Time(Seconds(2),Milliseconds(500))),
Smoking("tearing_eyes", Item.ENDER_PEARL, SimpleResult(Item.ENDER_EYE), Time(Minutes(2),Seconds(30)),experience=5),
Blasting("blasting_obsidian_until_it_cries", Item.OBSIDIAN, SimpleResult(Item.CRYING_OBSIDIAN), Time(Seconds(10)),experience=1),
CraftingShapeless(
name="grass_block",
ingredients=[[Item.SHORT_GRASS,Item.SHORT_DRY_GRASS,Item.TALL_DRY_GRASS,Item.TALL_GRASS], Item.DIRT],
result=CountedResult(Item.GRASS_BLOCK)
),
Stonecutting(
name="wooden_chair",
ingredient=Item.OAK_PLANKS,
result=CountedResult(Item.OAK_STAIRS, count=1)
),
CampfireCooking(
name="wood_coal",
ingredient=[Item.OAK_LOG, Item.ACACIA_LOG, Item.BIRCH_LOG, Item.CHERRY_LOG, Item.DARK_OAK_LOG, Item.JUNGLE_LOG, Item.MANGROVE_LOG, Item.PALE_OAK_LOG, Item.SPRUCE_LOG],
result=SimpleResult(Item.CHARCOAL),
cookingtime=Time(Seconds(5)),
experience=0.5
),
CampfireCooking(
name="weedy_bread",
ingredient=Item.WHEAT,
result=SimpleResult(Item.BREAD),
cookingtime=Time(Minutes(1),Seconds(30)),
experience=3
),
CraftingShaped(
name="god_apple",
pattern=["AAA", "ABA", "AAA"],
key={"A": Item.GOLD_BLOCK, "B": Item.APPLE},
result=CountedResult(Item.ENCHANTED_GOLDEN_APPLE)
),
CraftingShaped(
name="totem_of_dying",
pattern=["ABA", "AAA", " A "],
key={"A": Item.GOLD_BLOCK, "B": [Item.DIAMOND, Item.EMERALD]},
result=CountedResult(Item.TOTEM_OF_UNDYING)
),
CratfingTransmute(
name="irond_pickaxe",
input=Item.IRON_PICKAXE,
material=Item.DIAMOND,
result=SimpleResult(Item.DIAMOND_PICKAXE),
category=Category.EQUIPMENT,
)
)
# Add the namespace to the datapack
pack.add_namespaces(ns1)
# Export the datapack
pack.export(overwrite=True)
Website
- See documentation about MCpypack under our Website
License
- This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mcpypack-0.5.0.tar.gz
(59.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
mcpypack-0.5.0-py3-none-any.whl
(74.4 kB
view details)
File details
Details for the file mcpypack-0.5.0.tar.gz.
File metadata
- Download URL: mcpypack-0.5.0.tar.gz
- Upload date:
- Size: 59.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a457f8aa111e95d13becf563c2c78fe6db5fdbd4cff13f5743101e103a3fa64
|
|
| MD5 |
c7043a83f9a5e655f86770fb8cc1faa5
|
|
| BLAKE2b-256 |
57dba462fc451c68ac26e551117df0e17894125b81128ccbfb1f237cf2d6ed81
|
File details
Details for the file mcpypack-0.5.0-py3-none-any.whl.
File metadata
- Download URL: mcpypack-0.5.0-py3-none-any.whl
- Upload date:
- Size: 74.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0b96e08f8d1229fb5715aa035b22cec9e764e9fb90d2ba1e289e2f30b16516a
|
|
| MD5 |
9947f9bf8c0b2bb106d35f4b590efcf7
|
|
| BLAKE2b-256 |
00aa217456910544291b0192703d81e5f88bb77e7efe7fc4fe3c4de9c83d0099
|