Skip to content

annhilati/beetsmith

Repository files navigation

Note

State of Development
As of now, Beetsmith isn't a lot more than a mere proof of concept.
Though any item data can be stored already and custom items can be configured with behaviours for typical weapons, etc.,
how things are done exactly has to be rethought most certainly.

Tip

While being easy to use, this library is not that powerful. There are similar projects like StewBeet and simple_item_plugin that are a lot more powerful. This library mirrors my personal needs for making custom items in Minecraft.

logo

BeetSmith

Features

  • 📚 Item behaviour definition through rigid abstractions
  • 📑 YAML-file definition format with mild syntax warnings
  • 📂 Automatic implementation of files required for a desired behavior
  • ⛓️‍💥 Beet-Integration

Usage

Warning

BeetSmith is still heavily under development, not feature-complete and unstable.

1. Defining an Item

from beetsmith import CustomItem

item = CustomItem(id="custom:test", name="Test", model="nether_star")

item.weapon(attack_damage=10,
            attack_speed=2,
            disable_blocking=5)
item.enchantable(20, "enchantable/sharp_weapon")
item.rarity("uncommon")

2. Automatically implementing an Item into a Datapack with beet

# This is a normal beet plugin
from beet import Context
from beetsmith import CustomItem

def main(ctx: Context):
    item = CustomItem(...)

    item.implement(ctx.data)

3. Defining an Item in another way

# this is ./src/customitems/testitem.yml
type: CustomItem
name: Test
model: nether_star
behaviour:
    - weapon:
        attack_damage: 10
        attack_speed: 2
        disable_blocking: 5
    - enchantable:
        enchantability: 20
        enchantable_tag: enchantable/sharp_weapon
    - rarity:
        rarity: uncommon

... and loading a lot of such files with beet ...

# another unspectecular beet plugin
from beet import Context
from beetsmith import bulk_implement

def main(ctx: Context):
    bulk_implement("./src/customitems", ctx.data)

About

A python library for working with items in Minecraft data packs

Topics

Resources

Stars

Watchers

Forks