⏳ loading#

Sets up the load functions of the datapack, completed by stewbeet.plugins.finalyze.dependencies.

beet_default(ctx: Context)[source]#

Main entry point for the datapack loading plugin.

Requires plugin stewbeet.plugins.finalyze.dependencies later in the pipeline to complete.

Parameters:

ctx – The beet context.

write_enabled_tag(
ctx: Context,
) → None[source]#

The Smithed “pack enabled tag” convention: a predicate tag and version providers other packs read, whatever the load order.

Minecraft 26.2 and older refuse the predicate’s type key, so a pack supporting any of them does not get it.

storage_data(
obj: Item,
) → JsonDict[source]#

An item as the items storage holds it, every component namespaced and its item model first when it has one.

ranged_weapons#

The hidden enchantment of each RangedWeapon, and the check giving back what a crossbow loaded instead of its ammunition.

CROSSBOW_CHARGE_TIME: float = 1.25[source]#

Seconds a vanilla crossbow takes to load.

HANDS: dict[str, str] = {'mainhand': 'SelectedItem', 'offhand': 'equipment.offhand'}[source]#

Player slot of each hand, and where the player’s data holds it.

write_ranged_weapons() → None[source]#

Write the enchantment of every item with a ranged_weapon, a curse so a grindstone keeps it.

write_enchantment(
item: Item,
) → None[source]#

The enchantment changing the charge time of the item and the damage of the arrows it shoots.

write_ammunition_check(
item: Item,
ammunition: str,
) → None[source]#

Whenever the inventory of a player holding this crossbow changes, unload it when it holds anything else than ammunition.

silent#