refactor(plugin-api): Add pumpkin-plugin-wit as subtree
This commit is contained in:
commit
f40c08ca26
49 files changed
+14389
No files matched your search
@@ -0,0 +1,88 @@
|
||||
interface recipe {
|
||||
use item-stack.{item-stack};
|
||||
|
||||
/// Recipe category for the recipe book.
|
||||
enum recipe-category {
|
||||
building,
|
||||
redstone,
|
||||
equipment,
|
||||
misc,
|
||||
food,
|
||||
blocks,
|
||||
}
|
||||
|
||||
/// Represents an ingredient in a recipe.
|
||||
variant ingredient {
|
||||
/// A specific item (e.g. "minecraft:diamond").
|
||||
item(string),
|
||||
/// A tag group of items (e.g., "minecraft:logs").
|
||||
tag(string),
|
||||
/// One of multiple specific items.
|
||||
one-of(list<string>),
|
||||
}
|
||||
|
||||
/// Represents a shaped crafting recipe.
|
||||
record shaped-recipe {
|
||||
/// The pattern of the recipe (e.g., ["# #", " s ", "# #"]).
|
||||
pattern: list<string>,
|
||||
/// Mapping of characters in the pattern to ingredients.
|
||||
key: list<tuple<string, ingredient>>,
|
||||
/// The resulting item stack.
|
||||
output: item-stack,
|
||||
/// The recipe group (optional).
|
||||
group: option<string>,
|
||||
/// The recipe category in the recipe book.
|
||||
category: option<recipe-category>,
|
||||
/// Whether to show a toast notification when the recipe is unlocked.
|
||||
show-notification: option<bool>,
|
||||
}
|
||||
|
||||
/// Represents a shapeless crafting recipe.
|
||||
record shapeless-recipe {
|
||||
/// The list of ingredients required.
|
||||
ingredients: list<ingredient>,
|
||||
/// The resulting item stack.
|
||||
output: item-stack,
|
||||
/// The recipe group (optional).
|
||||
group: option<string>,
|
||||
/// The recipe category in the recipe book.
|
||||
category: option<recipe-category>,
|
||||
}
|
||||
|
||||
/// Represents a cooking recipe (Smelting, Blasting, Smoking, Campfire).
|
||||
record cooking-recipe {
|
||||
/// The ingredient to cook.
|
||||
ingredient: ingredient,
|
||||
/// The resulting item stack.
|
||||
output: item-stack,
|
||||
/// Experience points awarded.
|
||||
experience: f32,
|
||||
/// Cooking time in ticks.
|
||||
cooking-time: u32,
|
||||
/// The recipe group (optional).
|
||||
group: option<string>,
|
||||
/// The recipe category in the recipe book.
|
||||
category: option<recipe-category>,
|
||||
}
|
||||
|
||||
/// Types of cooking stations.
|
||||
enum cooking-type {
|
||||
smelting,
|
||||
blasting,
|
||||
smoking,
|
||||
campfire,
|
||||
}
|
||||
|
||||
/// Common interface for registering recipes.
|
||||
resource recipe-manager {
|
||||
/// Registers a shaped crafting recipe.
|
||||
register-shaped: func(id: string, recipe: shaped-recipe);
|
||||
|
||||
/// Registers a shapeless crafting recipe.
|
||||
register-shapeless: func(id: string, recipe: shapeless-recipe);
|
||||
|
||||
/// Registers a cooking recipe.
|
||||
register-cooking: func(id: string, station-type: cooking-type, recipe: cooking-recipe);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user