Skip to main content

Python library for easy creation of Minecraft datapacks

Project description

MCpypack

Python PyPI License Downloads

  • 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 CountedResult, Rarity
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=CountedResult(
            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,
                    }
                )
            )
        )
    ),
)

# Add the namespace to the datapack
pack.add_namespaces(ns1)

# Export the datapack
pack.export()

Website

  • See documentation about MCpypack under our Website

License

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

mcpypack-0.5.1.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

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

mcpypack-0.5.1-py3-none-any.whl (88.4 kB view details)

Uploaded Python 3

File details

Details for the file mcpypack-0.5.1.tar.gz.

File metadata

  • Download URL: mcpypack-0.5.1.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mcpypack-0.5.1.tar.gz
Algorithm Hash digest
SHA256 09fc566ebd8f63f7da3de1f64edc1fc6294b8c340383a5e529b5c93040667928
MD5 05b6d178c84fde768bf7c5ccebc2626c
BLAKE2b-256 1ee5aeb7cc2ba68d0485b7c242c05c8a5a8b81a3957da4c3704db60faa7efbe5

See more details on using hashes here.

File details

Details for the file mcpypack-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: mcpypack-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 88.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for mcpypack-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b46f1446d7b35bc013ebc1a0925a2bcfc1b9fe15f811f614cdbdc5ea7c672ad5
MD5 01e58b6b9255f4fe4d59d3e5b796b52f
BLAKE2b-256 4adc16741f8f0b8a5d024b78b149af5ec5012eeb1dac9e042044390a79dacea6

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