From 1e4f0235893d57b869e25726b2d5531ee0ac4ce6 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Fri, 23 May 2025 21:25:51 +0530 Subject: [PATCH 01/10] Initial Create Recipes --- public/mcdoc/create.mcdoc | 206 ++++++++++++++++++++++++++++++++++++++ src/config.json | 7 ++ src/locales/en.json | 2 + 3 files changed, 215 insertions(+) create mode 100644 public/mcdoc/create.mcdoc diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc new file mode 100644 index 000000000..a14de7727 --- /dev/null +++ b/public/mcdoc/create.mcdoc @@ -0,0 +1,206 @@ +dispatch minecraft:resource[create:recipes] to struct Recipes { + type: #[id] Type, + ...create:recipes[[type]], +} + +enum(string) Type { + 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, +} + +struct Item { + item?: string, + tag?: string, + fluid?: string, + fluidTag?: string, + amount?: int, + nbt?: NBT +} + +dispatch create:recipes[create:crushing] to struct { + processingTime: int @ 1.., + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + chance?: float @ 0.., + count?: int @ 1.., + item: string, + }] @ 1.., +} + +dispatch create:recipes[create:cutting] to struct { + processingTime: int @ 1.., + ingredients: [struct { + item?: string, + tag?: string, + count?: int @ 1.., + }] @ 1, + results: [struct { + item: string, + count?: int @ 1.., + }] @ 1, +} + +dispatch create:recipes[create:deploying] to struct { + /// The first object is the base item and the second object is the ingredient + ingredients: [struct { + item?: string, + tag?: string + }] @ 2, + keepHeldItem?: boolean, + results: [struct { + item: string, + }] @ 1, +} + +dispatch create:recipes[create:emptying] to struct { + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + item?: string, + fluid?: string, + amount?: int @ 1.., + }], +} + +dispatch create:recipes[create:filling] to struct { + /// The first object is the base and the second object is the fluid + ingredients: [struct { + item?: string, + tag?: string, + }, struct { + amount: int @ 1.., + fluid?: string, + fluidTag?: string, + nbt: NBT, + }], + results: [struct { item: string }] @ 1, +} + +dispatch create:recipes[create:haunting] to struct { + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + chance?: float @ 0.., + count?: int @ 1.., + item: string, + }] @ 1.., +} + +dispatch create:recipes[create:item_application] to struct { + /// The first object is the base item and the second object is the ingredient + ingredients: [struct { + item?: string, + tag?: string + }] @ 2, + results: [struct { + item: string, + }] @ 1, +} + +dispatch create:recipes[create:mechanical_crafting] to MechanicalCrafting + +dispatch create:recipes[create:milling] to struct { + processingTime: int @ 1.., + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + chance?: float @ 0.., + count?: int @ 1.., + item: string, + }] @ 1.., +} + +dispatch create:recipes[create:mixing] to struct { + heatRequirement?: ("heated" | "superheated"), + ingredients: [Item], + results: [Item] @ 1, +} + +dispatch create:recipes[create:pressing] to struct { + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + item?: string, + tag?: string, + }] @ 1, +} + +dispatch create:recipes[create:sandpaper_polishing] to struct { + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + item?: string, + tag?: string, + }] @ 1, +} + +dispatch create:recipes[create:sequenced_assembly] to struct { + ingredient: struct { + item?: string, + tag?: string, + }, + loops: int @ 1.., + results: [struct { + chance?: float @ 0.., + count?: int @ 1.., + item: string, + }], + sequence: [Recipes], + transitionalItem: struct { + item: string, + }, +} + +dispatch create:recipes[create:splashing] to struct { + ingredients: [struct { + item?: string, + tag?: string, + }] @ 1, + results: [struct { + chance?: float @ 0.., + count?: int @ 1.., + item: string, + }] @ 1.., +} + +type MechanicalCrafting = struct { + acceptMirrored?: boolean, + pattern: [string], + key: struct { + [K]: (V) + }, + result: struct { + count?: int @ 1.., + item: string, + }, +} diff --git a/src/config.json b/src/config.json index e5c8af8df..576575de0 100644 --- a/src/config.json +++ b/src/config.json @@ -801,6 +801,13 @@ "dependency": "sky_aesthetics", "minVersion": "1.21.1", "wiki": "https://github.com/TathanDev/SkyAesthetics/wiki/Custom-Sky" + }, + { + "id": "create:recipes", + "url": "create/recipes", + "path": "create", + "tags": ["partners"], + "dependency": "create" } ], "legacyGuides": [ diff --git a/src/locales/en.json b/src/locales/en.json index 1d3b4ba9e..53b93de62 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -69,6 +69,7 @@ "generator.cat_variant": "Cat Variant", "generator.chat_type": "Chat Type", "generator.cow_variant": "Cow Variant", + "generator.create:recipes": "Create Recipes", "generator.damage_type": "Damage Type", "generator.dialog": "Dialog", "generator.dimension": "Dimension", @@ -192,6 +193,7 @@ "normalize": "Normalize", "not_found.description": "The page you were looking for does not exist.", "output_settings": "Output settings", + "partner.create": "Create", "partner.fabric": "Fabric", "partner.immersive_weathering": "Immersive Weathering", "partner.lithostitched": "Lithostitched", From d8e4fdfa1ee305199fe63c1dbf93757d21250589 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sat, 24 May 2025 12:21:06 +0530 Subject: [PATCH 02/10] Minor Changes --- public/mcdoc/create.mcdoc | 100 ++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 46 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index a14de7727..33c90fcc1 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -25,19 +25,10 @@ struct NBT { Potion?: string, } -struct Item { - item?: string, - tag?: string, - fluid?: string, - fluidTag?: string, - amount?: int, - nbt?: NBT -} - dispatch create:recipes[create:crushing] to struct { processingTime: int @ 1.., ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { @@ -50,7 +41,7 @@ dispatch create:recipes[create:crushing] to struct { dispatch create:recipes[create:cutting] to struct { processingTime: int @ 1.., ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, count?: int @ 1.., }] @ 1, @@ -63,7 +54,7 @@ dispatch create:recipes[create:cutting] to struct { dispatch create:recipes[create:deploying] to struct { /// The first object is the base item and the second object is the ingredient ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string }] @ 2, keepHeldItem?: boolean, @@ -74,24 +65,25 @@ dispatch create:recipes[create:deploying] to struct { dispatch create:recipes[create:emptying] to struct { ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { - item?: string, - fluid?: string, - amount?: int @ 1.., + item: string, + count?: int @ 1.., + }, struct { + fluid: string, + amount: int @ 1.., }], } dispatch create:recipes[create:filling] to struct { - /// The first object is the base and the second object is the fluid ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }, struct { amount: int @ 1.., - fluid?: string, + fluid?: string, // Make the user select only one fluidTag?: string, nbt: NBT, }], @@ -100,7 +92,7 @@ dispatch create:recipes[create:filling] to struct { dispatch create:recipes[create:haunting] to struct { ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { @@ -113,7 +105,7 @@ dispatch create:recipes[create:haunting] to struct { dispatch create:recipes[create:item_application] to struct { /// The first object is the base item and the second object is the ingredient ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string }] @ 2, results: [struct { @@ -121,12 +113,26 @@ dispatch create:recipes[create:item_application] to struct { }] @ 1, } -dispatch create:recipes[create:mechanical_crafting] to MechanicalCrafting +dispatch create:recipes[create:mechanical_crafting] to struct { + acceptMirrored?: boolean, + /// Warning: JEI will not display recipes greater in size than 9x9 + pattern: [string], + key: struct { + [string]: struct { + item?: string, // Make the user select only one + tag?: string, + } + }, + result: struct { + count?: int @ 1.., + item: string, + }, +} dispatch create:recipes[create:milling] to struct { processingTime: int @ 1.., ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { @@ -138,35 +144,49 @@ dispatch create:recipes[create:milling] to struct { dispatch create:recipes[create:mixing] to struct { heatRequirement?: ("heated" | "superheated"), - ingredients: [Item], - results: [Item] @ 1, + ingredients: [struct { + count?: int @ 1.., + item?: string, // Make the user select only one + tag?: string, + fluid?: string, + fluidTag?: string, + amount?: int @ 1.., + nbt?: NBT, + }] @ 1.., + results: [struct { + count?: int @ 1.., + item?: string, // Make the user select only one + fluid?: string, + amount?: int @ 1.., + nbt?: NBT, + }] @ 1, } dispatch create:recipes[create:pressing] to struct { ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { - item?: string, - tag?: string, + item: string, + count?: int @ 1.., }] @ 1, } dispatch create:recipes[create:sandpaper_polishing] to struct { ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { - item?: string, - tag?: string, + item: string, + count?: int @ 1.., }] @ 1, } dispatch create:recipes[create:sequenced_assembly] to struct { ingredient: struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }, loops: int @ 1.., @@ -175,7 +195,7 @@ dispatch create:recipes[create:sequenced_assembly] to struct { count?: int @ 1.., item: string, }], - sequence: [Recipes], + sequence: [Recipes], // Remove the sequenced assembly recipe transitionalItem: struct { item: string, }, @@ -183,7 +203,7 @@ dispatch create:recipes[create:sequenced_assembly] to struct { dispatch create:recipes[create:splashing] to struct { ingredients: [struct { - item?: string, + item?: string, // Make the user select only one tag?: string, }] @ 1, results: [struct { @@ -192,15 +212,3 @@ dispatch create:recipes[create:splashing] to struct { item: string, }] @ 1.., } - -type MechanicalCrafting = struct { - acceptMirrored?: boolean, - pattern: [string], - key: struct { - [K]: (V) - }, - result: struct { - count?: int @ 1.., - item: string, - }, -} From 150e170fbef37ee63f177e44e985703b8a163655 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Mon, 26 May 2025 16:05:28 +0530 Subject: [PATCH 03/10] Minor Changes --- public/mcdoc/create.mcdoc | 122 +++++++++++++++++--------------------- 1 file changed, 54 insertions(+), 68 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index 33c90fcc1..7af6198ee 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -25,12 +25,29 @@ struct NBT { Potion?: string, } +type ItemOrTag = ( + struct { + item: string, + } | struct { + tag: string, + } +) + +type FluidOrTag = ( + struct { + fluid: string, + amount: int @ 1.., + nbt?: NBT, + } | struct { + fluidTag: string, + amount: int @ 1.., + nbt?: NBT, + } +) + dispatch create:recipes[create:crushing] to struct { processingTime: int @ 1.., - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { chance?: float @ 0.., count?: int @ 1.., @@ -53,10 +70,7 @@ dispatch create:recipes[create:cutting] to struct { dispatch create:recipes[create:deploying] to struct { /// The first object is the base item and the second object is the ingredient - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string - }] @ 2, + ingredients: [ItemOrTag] @ 2, keepHeldItem?: boolean, results: [struct { item: string, @@ -64,10 +78,7 @@ dispatch create:recipes[create:deploying] to struct { } dispatch create:recipes[create:emptying] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { item: string, count?: int @ 1.., @@ -78,23 +89,12 @@ dispatch create:recipes[create:emptying] to struct { } dispatch create:recipes[create:filling] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }, struct { - amount: int @ 1.., - fluid?: string, // Make the user select only one - fluidTag?: string, - nbt: NBT, - }], + ingredients: [ItemOrTag, FluidOrTag], results: [struct { item: string }] @ 1, } dispatch create:recipes[create:haunting] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { chance?: float @ 0.., count?: int @ 1.., @@ -104,10 +104,7 @@ dispatch create:recipes[create:haunting] to struct { dispatch create:recipes[create:item_application] to struct { /// The first object is the base item and the second object is the ingredient - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string - }] @ 2, + ingredients: [ItemOrTag] @ 2, results: [struct { item: string, }] @ 1, @@ -118,10 +115,7 @@ dispatch create:recipes[create:mechanical_crafting] to struct { /// Warning: JEI will not display recipes greater in size than 9x9 pattern: [string], key: struct { - [string]: struct { - item?: string, // Make the user select only one - tag?: string, - } + [string]: ItemOrTag, }, result: struct { count?: int @ 1.., @@ -131,10 +125,7 @@ dispatch create:recipes[create:mechanical_crafting] to struct { dispatch create:recipes[create:milling] to struct { processingTime: int @ 1.., - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { chance?: float @ 0.., count?: int @ 1.., @@ -144,29 +135,33 @@ dispatch create:recipes[create:milling] to struct { dispatch create:recipes[create:mixing] to struct { heatRequirement?: ("heated" | "superheated"), - ingredients: [struct { - count?: int @ 1.., - item?: string, // Make the user select only one - tag?: string, - fluid?: string, - fluidTag?: string, - amount?: int @ 1.., + ingredients: [(struct { + count: int @ 1.., + item: string, + } | struct { + count: int @ 1.., + tag: string, + } | struct { + fluid: string, + amount: int @ 1.., nbt?: NBT, - }] @ 1.., - results: [struct { - count?: int @ 1.., - item?: string, // Make the user select only one - fluid?: string, - amount?: int @ 1.., + } | struct { + fluidTag: string, + amount: int @ 1.., nbt?: NBT, - }] @ 1, + })] @ 1.., + results: [(struct { + count: int @ 1.., + item: string, + } | struct { + fluid: string, + amount: int @ 1.., + nbt?: NBT, + })] @ 1, } dispatch create:recipes[create:pressing] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { item: string, count?: int @ 1.., @@ -174,10 +169,7 @@ dispatch create:recipes[create:pressing] to struct { } dispatch create:recipes[create:sandpaper_polishing] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { item: string, count?: int @ 1.., @@ -185,27 +177,21 @@ dispatch create:recipes[create:sandpaper_polishing] to struct { } dispatch create:recipes[create:sequenced_assembly] to struct { - ingredient: struct { - item?: string, // Make the user select only one - tag?: string, - }, + ingredient: ItemOrTag, loops: int @ 1.., results: [struct { chance?: float @ 0.., count?: int @ 1.., item: string, }], - sequence: [Recipes], // Remove the sequenced assembly recipe + sequence: [Recipes], transitionalItem: struct { item: string, }, } dispatch create:recipes[create:splashing] to struct { - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { chance?: float @ 0.., count?: int @ 1.., From cf0aeb9890686ff820770782a18abad6322ea911 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sat, 21 Jun 2025 17:52:59 +0530 Subject: [PATCH 04/10] fix issue with mixing recipe --- public/mcdoc/create.mcdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index 7af6198ee..a8140a158 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -136,11 +136,11 @@ dispatch create:recipes[create:milling] to struct { dispatch create:recipes[create:mixing] to struct { heatRequirement?: ("heated" | "superheated"), ingredients: [(struct { - count: int @ 1.., item: string, - } | struct { count: int @ 1.., + } | struct { tag: string, + count: int @ 1.., } | struct { fluid: string, amount: int @ 1.., From 471a4d0546c3ce0fef597b74348cb3aaf543f364 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sat, 21 Jun 2025 17:55:24 +0530 Subject: [PATCH 05/10] fix issue with cutting recipe --- public/mcdoc/create.mcdoc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index a8140a158..d4fbf13f8 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -57,11 +57,7 @@ dispatch create:recipes[create:crushing] to struct { dispatch create:recipes[create:cutting] to struct { processingTime: int @ 1.., - ingredients: [struct { - item?: string, // Make the user select only one - tag?: string, - count?: int @ 1.., - }] @ 1, + ingredients: [ItemOrTag] @ 1, results: [struct { item: string, count?: int @ 1.., From bdf0381f305a662cfbbc1fb4015b0b5212020717 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sat, 21 Jun 2025 22:15:56 +0530 Subject: [PATCH 06/10] Update to 1.21.1 --- .vscode/snippets.json.code-snippets | 36 +++++++ public/mcdoc/create.mcdoc | 145 ++++++++++++++++------------ 2 files changed, 121 insertions(+), 60 deletions(-) create mode 100644 .vscode/snippets.json.code-snippets diff --git a/.vscode/snippets.json.code-snippets b/.vscode/snippets.json.code-snippets new file mode 100644 index 000000000..d9c5ae46a --- /dev/null +++ b/.vscode/snippets.json.code-snippets @@ -0,0 +1,36 @@ +{ + // Place your misode.github.io workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "Since 1.21.1": { + "scope": "mcdoc", + "prefix": "since", + "body": [ + "#[since=\"${1:1.21.1}\"]", + "$0" + ], + "description": "Add a @since tag to the documentation" + }, + "Until 1.20.2": { + "scope": "mcdoc", + "prefix": "until", + "body": [ + "#[until=\"${1:1.20.2}\"]", + "$0" + ], + "description": "Add an @until tag to the documentation" + } +} diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index d4fbf13f8..cd848d6e6 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -1,3 +1,5 @@ +use ::java::world::component::DataComponentPatch + dispatch minecraft:resource[create:recipes] to struct Recipes { type: #[id] Type, ...create:recipes[[type]], @@ -25,6 +27,42 @@ struct NBT { Potion?: string, } +type Item = struct { + #[until="1.20.2"] + item: string, + #[since="1.21.1"] + id: string, + chance?: float @ 0.., + count?: int @ 1.., +} + +type ItemWithCount = struct { + #[until="1.20.2"] + item: string, + #[since="1.21.1"] + id: string, + chance?: float @ 0.., +} + +type SimpleItem = struct { + #[until="1.20.2"] + item: string, + #[since="1.21.1"] + id: string, +} + +type Fluid = struct { + #[until="1.20.2"] + fluid: string, + #[until="1.20.2"] + nbt?: NBT, + #[since="1.21.1"] + id: string, + #[since="1.21.1"] + amount: int @ 1.., + components?: DataComponentPatch, +} + type ItemOrTag = ( struct { item: string, @@ -36,101 +74,104 @@ type ItemOrTag = ( type FluidOrTag = ( struct { fluid: string, + #[since="1.21.1"] + type: "fluid_stack", amount: int @ 1.., + #[until="1.20.2"] nbt?: NBT, } | struct { + #[until="1.20.2"] fluidTag: string, + #[since="1.21.1"] + fluid_tag: string, + #[since="1.21.1"] + type: "fluid_tag", amount: int @ 1.., + #[until="1.20.2"] nbt?: NBT, } ) dispatch create:recipes[create:crushing] to struct { + #[until="1.20.2"] processingTime: int @ 1.., + #[since="1.21.1"] + processing_time: int @ 1.., ingredients: [ItemOrTag] @ 1, - results: [struct { - chance?: float @ 0.., - count?: int @ 1.., - item: string, - }] @ 1.., + results: [Item] @ 1.., } dispatch create:recipes[create:cutting] to struct { + #[until="1.20.2"] processingTime: int @ 1.., + #[since="1.21.1"] + processing_time: int @ 1.., ingredients: [ItemOrTag] @ 1, - results: [struct { - item: string, - count?: int @ 1.., - }] @ 1, + results: [Item] @ 1, } dispatch create:recipes[create:deploying] to struct { /// The first object is the base item and the second object is the ingredient ingredients: [ItemOrTag] @ 2, + #[until="1.20.2"] keepHeldItem?: boolean, - results: [struct { - item: string, - }] @ 1, + #[since="1.21.1"] + keep_held_item?: boolean, + results: [SimpleItem] @ 1, } dispatch create:recipes[create:emptying] to struct { ingredients: [ItemOrTag] @ 1, - results: [struct { - item: string, - count?: int @ 1.., - }, struct { - fluid: string, - amount: int @ 1.., - }], + results: [SimpleItem, Fluid], } dispatch create:recipes[create:filling] to struct { ingredients: [ItemOrTag, FluidOrTag], - results: [struct { item: string }] @ 1, + results: [SimpleItem] @ 1, } dispatch create:recipes[create:haunting] to struct { ingredients: [ItemOrTag] @ 1, - results: [struct { - chance?: float @ 0.., - count?: int @ 1.., - item: string, - }] @ 1.., + results: [Item] @ 1.., } dispatch create:recipes[create:item_application] to struct { /// The first object is the base item and the second object is the ingredient ingredients: [ItemOrTag] @ 2, - results: [struct { - item: string, - }] @ 1, + results: [SimpleItem] @ 1, } dispatch create:recipes[create:mechanical_crafting] to struct { + #[until="1.20.2"] acceptMirrored?: boolean, + #[since="1.21.1"] + accept_mirrored?: boolean, + #[since="1.21.1"] + category: string, /// Warning: JEI will not display recipes greater in size than 9x9 pattern: [string], key: struct { [string]: ItemOrTag, }, - result: struct { - count?: int @ 1.., - item: string, - }, + result: ItemWithCount, + #[since="1.21.1"] + show_notification?: boolean, } dispatch create:recipes[create:milling] to struct { + #[until="1.20.2"] processingTime: int @ 1.., + #[since="1.21.1"] + processing_time: int @ 1.., ingredients: [ItemOrTag] @ 1, - results: [struct { - chance?: float @ 0.., - count?: int @ 1.., - item: string, - }] @ 1.., + results: [Item] @ 1.., } -dispatch create:recipes[create:mixing] to struct { +dispatch create:recipes[create:mixing] to struct { // TODO + #[until="1.20.2"] heatRequirement?: ("heated" | "superheated"), + #[since="1.21.1"] + heat_requirement?: ("heated" | "superheated"), ingredients: [(struct { item: string, count: int @ 1.., @@ -157,40 +198,24 @@ dispatch create:recipes[create:mixing] to struct { } dispatch create:recipes[create:pressing] to struct { - ingredients: [ItemOrTag] @ 1, - results: [struct { - item: string, - count?: int @ 1.., - }] @ 1, + ingredients: [ItemOrTag] @ 1.., + results: [ItemWithCount] @ 1, } dispatch create:recipes[create:sandpaper_polishing] to struct { ingredients: [ItemOrTag] @ 1, - results: [struct { - item: string, - count?: int @ 1.., - }] @ 1, + results: [ItemWithCount] @ 1, } dispatch create:recipes[create:sequenced_assembly] to struct { ingredient: ItemOrTag, loops: int @ 1.., - results: [struct { - chance?: float @ 0.., - count?: int @ 1.., - item: string, - }], + results: [Item] @ 1.., sequence: [Recipes], - transitionalItem: struct { - item: string, - }, + transitionalItem: SimpleItem, } dispatch create:recipes[create:splashing] to struct { ingredients: [ItemOrTag] @ 1, - results: [struct { - chance?: float @ 0.., - count?: int @ 1.., - item: string, - }] @ 1.., + results: [Item] @ 1.., } From 60d23d878af8f974fde84529ebd226080004d8bf Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sun, 22 Jun 2025 10:53:02 +0530 Subject: [PATCH 07/10] add compacting recipe and fix some issues --- public/mcdoc/create.mcdoc | 64 +++++++++++++++++++++++---------------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index cd848d6e6..ec71b40fc 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -6,6 +6,7 @@ dispatch minecraft:resource[create:recipes] to struct Recipes { } enum(string) Type { + Compacting = "create:compacting", Crushing = "create:crushing", Cutting = "create:cutting", Deploying = "create:deploying", @@ -34,6 +35,8 @@ type Item = struct { id: string, chance?: float @ 0.., count?: int @ 1.., + #[since="1.21.1"] + components?: DataComponentPatch, } type ItemWithCount = struct { @@ -41,7 +44,9 @@ type ItemWithCount = struct { item: string, #[since="1.21.1"] id: string, - chance?: float @ 0.., + count?: int @ 0.., + #[since="1.21.1"] + components?: DataComponentPatch, } type SimpleItem = struct { @@ -49,6 +54,8 @@ type SimpleItem = struct { item: string, #[since="1.21.1"] id: string, + #[since="1.21.1"] + components?: DataComponentPatch, } type Fluid = struct { @@ -58,8 +65,8 @@ type Fluid = struct { nbt?: NBT, #[since="1.21.1"] id: string, - #[since="1.21.1"] amount: int @ 1.., + #[since="1.21.1"] components?: DataComponentPatch, } @@ -71,6 +78,16 @@ type ItemOrTag = ( } ) +type ItemOrTagWithCount = ( + struct { + item: string, + count?: int @ 1.., + } | struct { + tag: string, + count?: int @ 1.., + } +) + type FluidOrTag = ( struct { fluid: string, @@ -79,6 +96,8 @@ type FluidOrTag = ( amount: int @ 1.., #[until="1.20.2"] nbt?: NBT, + #[since="1.21.1"] + components?: DataComponentPatch, } | struct { #[until="1.20.2"] fluidTag: string, @@ -89,9 +108,18 @@ type FluidOrTag = ( amount: int @ 1.., #[until="1.20.2"] nbt?: NBT, + #[since="1.21.1"] + components?: DataComponentPatch, } ) +dispatch create:recipes[create:compacting] to struct { + ingredients: [(ItemOrTagWithCount | FluidOrTag)] @ 1.., + /// Doesnt work properly + /// The options are id and id, it should item and fluid + results: [(ItemWithCount | Fluid)] @ 1, +} + dispatch create:recipes[create:crushing] to struct { #[until="1.20.2"] processingTime: int @ 1.., @@ -167,34 +195,15 @@ dispatch create:recipes[create:milling] to struct { results: [Item] @ 1.., } -dispatch create:recipes[create:mixing] to struct { // TODO +dispatch create:recipes[create:mixing] to struct { #[until="1.20.2"] heatRequirement?: ("heated" | "superheated"), #[since="1.21.1"] heat_requirement?: ("heated" | "superheated"), - ingredients: [(struct { - item: string, - count: int @ 1.., - } | struct { - tag: string, - count: int @ 1.., - } | struct { - fluid: string, - amount: int @ 1.., - nbt?: NBT, - } | struct { - fluidTag: string, - amount: int @ 1.., - nbt?: NBT, - })] @ 1.., - results: [(struct { - count: int @ 1.., - item: string, - } | struct { - fluid: string, - amount: int @ 1.., - nbt?: NBT, - })] @ 1, + ingredients: [(ItemOrTagWithCount | FluidOrTag)] @ 1.., + /// Doesnt work properly + /// The options are id and id, it should item and fluid + results: [(ItemWithCount | Fluid)] @ 1, } dispatch create:recipes[create:pressing] to struct { @@ -212,7 +221,10 @@ dispatch create:recipes[create:sequenced_assembly] to struct { loops: int @ 1.., results: [Item] @ 1.., sequence: [Recipes], + #[until="1.20.2"] transitionalItem: SimpleItem, + #[since="1.21.1"] + transitional_item: SimpleItem, } dispatch create:recipes[create:splashing] to struct { From 43493db2862edbe61d4128e406f6f5ae8bc0188d Mon Sep 17 00:00:00 2001 From: VidTDM <77015935+VidTDM@users.noreply.github.com> Date: Sun, 22 Jun 2025 22:14:53 +0530 Subject: [PATCH 08/10] Delete .vscode/snippets.json.code-snippets --- .vscode/snippets.json.code-snippets | 36 ----------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .vscode/snippets.json.code-snippets diff --git a/.vscode/snippets.json.code-snippets b/.vscode/snippets.json.code-snippets deleted file mode 100644 index d9c5ae46a..000000000 --- a/.vscode/snippets.json.code-snippets +++ /dev/null @@ -1,36 +0,0 @@ -{ - // Place your misode.github.io workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and - // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope - // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is - // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: - // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. - // Placeholders with the same ids are connected. - // Example: - // "Print to console": { - // "scope": "javascript,typescript", - // "prefix": "log", - // "body": [ - // "console.log('$1');", - // "$2" - // ], - // "description": "Log output to console" - // } - "Since 1.21.1": { - "scope": "mcdoc", - "prefix": "since", - "body": [ - "#[since=\"${1:1.21.1}\"]", - "$0" - ], - "description": "Add a @since tag to the documentation" - }, - "Until 1.20.2": { - "scope": "mcdoc", - "prefix": "until", - "body": [ - "#[until=\"${1:1.20.2}\"]", - "$0" - ], - "description": "Add an @until tag to the documentation" - } -} From 6a6db2e1266c06da8793482a5ea4000238f86c8e Mon Sep 17 00:00:00 2001 From: VidTDM Date: Sun, 22 Jun 2025 22:53:25 +0530 Subject: [PATCH 09/10] Final Touches --- public/mcdoc/create.mcdoc | 43 ++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index ec71b40fc..a0e54d816 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -1,7 +1,7 @@ use ::java::world::component::DataComponentPatch dispatch minecraft:resource[create:recipes] to struct Recipes { - type: #[id] Type, + type: Type, ...create:recipes[[type]], } @@ -113,11 +113,21 @@ type FluidOrTag = ( } ) +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.., - /// Doesnt work properly - /// The options are id and id, it should item and fluid - results: [(ItemWithCount | Fluid)] @ 1, + #[until="1.20.2"] + results: [(ItemWithCount | Fluid)] @ 1.., + #[since="1.21.1"] + results: [MixingResult] @ 1, } dispatch create:recipes[create:crushing] to struct { @@ -139,10 +149,12 @@ dispatch create:recipes[create:cutting] to struct { } dispatch create:recipes[create:deploying] to struct { - /// The first object is the base item and the second object is the ingredient + /// The first item is the base item; the second is the ingredient to be deployed. ingredients: [ItemOrTag] @ 2, + /// Defaults to false. #[until="1.20.2"] keepHeldItem?: boolean, + /// Defaults to false. #[since="1.21.1"] keep_held_item?: boolean, results: [SimpleItem] @ 1, @@ -164,24 +176,26 @@ dispatch create:recipes[create:haunting] to struct { } dispatch create:recipes[create:item_application] to struct { - /// The first object is the base item and the second object is the ingredient + /// 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.20.2"] - acceptMirrored?: boolean, + acceptMirrored: boolean, #[since="1.21.1"] - accept_mirrored?: boolean, + accept_mirrored: boolean, + /// Identifier for the category this goes in the recipe book. #[since="1.21.1"] category: string, - /// Warning: JEI will not display recipes greater in size than 9x9 - pattern: [string], + /// Warning: Recipes larger than 9x9 will not be displayed in JEI. + pattern: [#[crafting_ingredient(definition=true)] string], key: struct { - [string]: ItemOrTag, + [#[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, } @@ -201,9 +215,10 @@ dispatch create:recipes[create:mixing] to struct { #[since="1.21.1"] heat_requirement?: ("heated" | "superheated"), ingredients: [(ItemOrTagWithCount | FluidOrTag)] @ 1.., - /// Doesnt work properly - /// The options are id and id, it should item and fluid - results: [(ItemWithCount | Fluid)] @ 1, + #[until="1.20.2"] + results: [(ItemWithCount | Fluid)] @ 1.., + #[since="1.21.1"] + results: [MixingResult] @ 1, } dispatch create:recipes[create:pressing] to struct { From d47b398172a9785665b6529936ae2149c995b504 Mon Sep 17 00:00:00 2001 From: VidTDM Date: Mon, 23 Jun 2025 18:26:10 +0530 Subject: [PATCH 10/10] change warning colour --- public/mcdoc/create.mcdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/mcdoc/create.mcdoc b/public/mcdoc/create.mcdoc index a0e54d816..41488032a 100644 --- a/public/mcdoc/create.mcdoc +++ b/public/mcdoc/create.mcdoc @@ -189,7 +189,7 @@ dispatch create:recipes[create:mechanical_crafting] to struct { /// 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. + /// Warning: Recipes larger than 9x9 will not be displayed in JEI. pattern: [#[crafting_ingredient(definition=true)] string], key: struct { [#[crafting_ingredient] string]: ItemOrTag,