mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
* Initial Create Recipes * Minor Changes * Minor Changes * fix issue with mixing recipe * fix issue with cutting recipe * Update to 1.21.1 * add compacting recipe and fix some issues * Delete .vscode/snippets.json.code-snippets * Final Touches * change warning colour * Sanitize mcdoc doc comments * Fix until attributes, as they are exclusive --------- Co-authored-by: Misode <misoloo64@gmail.com>
253 lines
5.6 KiB
Plaintext
253 lines
5.6 KiB
Plaintext
use ::java::world::component::DataComponentPatch
|
|
|
|
dispatch minecraft:resource[create:recipes] to struct Recipes {
|
|
type: Type,
|
|
...create:recipes[[type]],
|
|
}
|
|
|
|
enum(string) Type {
|
|
Compacting = "create:compacting",
|
|
Crushing = "create:crushing",
|
|
Cutting = "create:cutting",
|
|
Deploying = "create:deploying",
|
|
Emptying = "create:emptying",
|
|
Filling = "create:filling",
|
|
Haunting = "create:haunting",
|
|
ItemApplication = "create:item_application",
|
|
MechanicalCrafting = "create:mechanical_crafting",
|
|
Milling = "create:milling",
|
|
Mixing = "create:mixing",
|
|
Pressing = "create:pressing",
|
|
SandpaperPolishing = "create:sandpaper_polishing",
|
|
SequencedAssembly = "create:sequenced_assembly",
|
|
Splashing = "create:splashing",
|
|
}
|
|
|
|
struct NBT {
|
|
Bottle?: ("REGULAR" | "SPLASH" | "LINGERING"),
|
|
Potion?: string,
|
|
}
|
|
|
|
type Item = struct {
|
|
#[until="1.21.1"]
|
|
item: string,
|
|
#[since="1.21.1"]
|
|
id: string,
|
|
chance?: float @ 0..,
|
|
count?: int @ 1..,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
}
|
|
|
|
type ItemWithCount = struct {
|
|
#[until="1.21.1"]
|
|
item: string,
|
|
#[since="1.21.1"]
|
|
id: string,
|
|
count?: int @ 0..,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
}
|
|
|
|
type SimpleItem = struct {
|
|
#[until="1.21.1"]
|
|
item: string,
|
|
#[since="1.21.1"]
|
|
id: string,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
}
|
|
|
|
type Fluid = struct {
|
|
#[until="1.21.1"]
|
|
fluid: string,
|
|
#[until="1.21.1"]
|
|
nbt?: NBT,
|
|
#[since="1.21.1"]
|
|
id: string,
|
|
amount: int @ 1..,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
}
|
|
|
|
type ItemOrTag = (
|
|
struct {
|
|
item: string,
|
|
} | struct {
|
|
tag: string,
|
|
}
|
|
)
|
|
|
|
type ItemOrTagWithCount = (
|
|
struct {
|
|
item: string,
|
|
count?: int @ 1..,
|
|
} | struct {
|
|
tag: string,
|
|
count?: int @ 1..,
|
|
}
|
|
)
|
|
|
|
type FluidOrTag = (
|
|
struct {
|
|
fluid: string,
|
|
#[since="1.21.1"]
|
|
type: "fluid_stack",
|
|
amount: int @ 1..,
|
|
#[until="1.21.1"]
|
|
nbt?: NBT,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
} | struct {
|
|
#[until="1.21.1"]
|
|
fluidTag: string,
|
|
#[since="1.21.1"]
|
|
fluid_tag: string,
|
|
#[since="1.21.1"]
|
|
type: "fluid_tag",
|
|
amount: int @ 1..,
|
|
#[until="1.21.1"]
|
|
nbt?: NBT,
|
|
#[since="1.21.1"]
|
|
components?: DataComponentPatch,
|
|
}
|
|
)
|
|
|
|
type MixingResult = struct {
|
|
id: string,
|
|
/// Used for items; optional field.
|
|
count?: int @ 1..,
|
|
/// Used for fluids; mandatory field.
|
|
amount?: int @ 1..,
|
|
components?: DataComponentPatch,
|
|
}
|
|
|
|
dispatch create:recipes[create:compacting] to struct {
|
|
ingredients: [(ItemOrTagWithCount | FluidOrTag)] @ 1..,
|
|
results: (
|
|
#[until="1.21.1"]
|
|
[(ItemWithCount | Fluid)] @ 1.. |
|
|
#[since="1.21.1"]
|
|
[MixingResult] @ 1 |
|
|
),
|
|
}
|
|
|
|
dispatch create:recipes[create:crushing] to struct {
|
|
#[until="1.21.1"]
|
|
processingTime: int @ 1..,
|
|
#[since="1.21.1"]
|
|
processing_time: int @ 1..,
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [Item] @ 1..,
|
|
}
|
|
|
|
dispatch create:recipes[create:cutting] to struct {
|
|
#[until="1.21.1"]
|
|
processingTime: int @ 1..,
|
|
#[since="1.21.1"]
|
|
processing_time: int @ 1..,
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [Item] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:deploying] to struct {
|
|
/// The first item is the base item; the second is the ingredient to be deployed.
|
|
ingredients: [ItemOrTag] @ 2,
|
|
/// Defaults to false.
|
|
#[until="1.21.1"]
|
|
keepHeldItem?: boolean,
|
|
/// Defaults to false.
|
|
#[since="1.21.1"]
|
|
keep_held_item?: boolean,
|
|
results: [SimpleItem] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:emptying] to struct {
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [SimpleItem, Fluid],
|
|
}
|
|
|
|
dispatch create:recipes[create:filling] to struct {
|
|
ingredients: [ItemOrTag, FluidOrTag],
|
|
results: [SimpleItem] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:haunting] to struct {
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [Item] @ 1..,
|
|
}
|
|
|
|
dispatch create:recipes[create:item_application] to struct {
|
|
/// The first item is the base item; the second is the ingredient to be applied.
|
|
ingredients: [ItemOrTag] @ 2,
|
|
results: [SimpleItem] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:mechanical_crafting] to struct {
|
|
#[until="1.21.1"]
|
|
acceptMirrored: boolean,
|
|
#[since="1.21.1"]
|
|
accept_mirrored: boolean,
|
|
/// Identifier for the category this goes in the recipe book.
|
|
#[since="1.21.1"]
|
|
category: string,
|
|
/// **Warning:** Recipes larger than 9x9 will not be displayed in JEI.
|
|
pattern: [#[crafting_ingredient(definition=true)] string],
|
|
key: struct {
|
|
[#[crafting_ingredient] string]: ItemOrTag,
|
|
},
|
|
result: ItemWithCount,
|
|
/// Determines if a notification is shown when unlocking this recipe. Defaults to true.
|
|
#[since="1.21.1"]
|
|
show_notification?: boolean,
|
|
}
|
|
|
|
dispatch create:recipes[create:milling] to struct {
|
|
#[until="1.21.1"]
|
|
processingTime: int @ 1..,
|
|
#[since="1.21.1"]
|
|
processing_time: int @ 1..,
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [Item] @ 1..,
|
|
}
|
|
|
|
dispatch create:recipes[create:mixing] to struct {
|
|
#[until="1.21.1"]
|
|
heatRequirement?: ("heated" | "superheated"),
|
|
#[since="1.21.1"]
|
|
heat_requirement?: ("heated" | "superheated"),
|
|
ingredients: [(ItemOrTagWithCount | FluidOrTag)] @ 1..,
|
|
results: (
|
|
#[until="1.21.1"]
|
|
[(ItemWithCount | Fluid)] @ 1.. |
|
|
#[since="1.21.1"]
|
|
[MixingResult] @ 1 |
|
|
),
|
|
}
|
|
|
|
dispatch create:recipes[create:pressing] to struct {
|
|
ingredients: [ItemOrTag] @ 1..,
|
|
results: [ItemWithCount] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:sandpaper_polishing] to struct {
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [ItemWithCount] @ 1,
|
|
}
|
|
|
|
dispatch create:recipes[create:sequenced_assembly] to struct {
|
|
ingredient: ItemOrTag,
|
|
loops: int @ 1..,
|
|
results: [Item] @ 1..,
|
|
sequence: [Recipes],
|
|
#[until="1.21.1"]
|
|
transitionalItem: SimpleItem,
|
|
#[since="1.21.1"]
|
|
transitional_item: SimpleItem,
|
|
}
|
|
|
|
dispatch create:recipes[create:splashing] to struct {
|
|
ingredients: [ItemOrTag] @ 1,
|
|
results: [Item] @ 1..,
|
|
}
|