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.core import Datapack, Namespace
from MCpypack.recipe import CraftingShapeless
from MCpypack.utils import ItemStack, Rarity, SwingAnimation
from MCpypack import components
from MCpypack.item.final import Item, Enchantment, DamageType
# Create a new datapack
pack = Datapack(name="mcpypack", description='mcpypack yay', version='26.1')
# Create a new namespace
ns1 = Namespace('recipes')
# Add recipes to the namespace
ns1.add_recipes(
CraftingShapeless(
name="python",
ingredients=[Item.DIAMOND_SWORD, Item.COPPER_INGOT],
result=ItemStack(
item_id=Item.COPPER_SWORD,
count=1,
components=components.ItemComponents(
components.EnchantmentGlintOverride(True),
components.AttackRange(
max_reach=25
),
components.DamageType(
DamageType.LIGHTNING_BOLT
),
components.Rarity(
Rarity.EPIC
),
components.Weapon(
item_damage_per_attack=0,
disable_blocking_for_seconds=5
),
components.Unbreakable(),
components.Enchantments(
{
Enchantment.KNOCKBACK: 50,
Enchantment.SHARPNESS: 5,
}
),
components.SwingAnimation(
animation_type=SwingAnimation.STAB,
duration=10,
)
)
)
),
)
# Add the namespace to the datapack
pack.add_namespaces(ns1)
# Export the datapack
pack.export()
Website
- See documentation about MCpypack under our Website
Tests
- We use pytest
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.2.tar.gz
(64.1 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.2-py3-none-any.whl
(89.4 kB
view details)
File details
Details for the file mcpypack-0.5.2.tar.gz.
File metadata
- Download URL: mcpypack-0.5.2.tar.gz
- Upload date:
- Size: 64.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
630c04c399e4cd7fc30e6ff2fd58cdf4897a8946d3715ba83d7f25406dd9e413
|
|
| MD5 |
1af0338af4e283a8f2365670f79a6297
|
|
| BLAKE2b-256 |
ae304ab2e57e068ad1185bb4d3d86979aed13aae075975b71960a9a4ae469027
|
File details
Details for the file mcpypack-0.5.2-py3-none-any.whl.
File metadata
- Download URL: mcpypack-0.5.2-py3-none-any.whl
- Upload date:
- Size: 89.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 |
6f13e85cf2c7ec0ca19a6cf2e9245615574ee54628a6981c90866c4f0a7fb154
|
|
| MD5 |
4e6fce26875dbeaa4e50b55586bb87a2
|
|
| BLAKE2b-256 |
97d2fdf84e536748f9ddcef7badcf8a7f4c8993600f6699c891e043c0b3ad4db
|