https://github.com/annhilati/beetsmith
A python library for working with items in Minecraft data packs
https://github.com/annhilati/beetsmith
beet datapack
Last synced: 3 months ago
JSON representation
A python library for working with items in Minecraft data packs
- Host: GitHub
- URL: https://github.com/annhilati/beetsmith
- Owner: annhilati
- Created: 2025-02-05T18:51:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-19T15:59:14.000Z (6 months ago)
- Last Synced: 2025-12-22T02:46:52.842Z (6 months ago)
- Topics: beet, datapack
- Language: Python
- Homepage:
- Size: 339 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> [!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](https://github.com/Stoupy51/StewBeet) and [simple_item_plugin](https://github.com/edayot/simple_item_plugin) that are a lot more powerful. This library mirrors my personal needs for making custom items in Minecraft.

# 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](https://gitHub.com/mcbeet/beet)-Integration
### Usage
> [!WARNING]
> BeetSmith is still heavily under development, not feature-complete and unstable.
#### 1. Defining an Item
```py
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
```py
# 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
```yaml
# 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 ...
```py
# another unspectecular beet plugin
from beet import Context
from beetsmith import bulk_implement
def main(ctx: Context):
bulk_implement("./src/customitems", ctx.data)
```