Skip to content

Commit b1149e3

Browse files
authored
Generators for create mod recipe type (#750)
* Initial Create Recipes * Minor Changes * Minor Changes
1 parent 4f2c855 commit b1149e3

File tree

3 files changed

+209
-0
lines changed

3 files changed

+209
-0
lines changed

public/mcdoc/create.mcdoc

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
dispatch minecraft:resource[create:recipes] to struct Recipes {
2+
type: #[id] Type,
3+
...create:recipes[[type]],
4+
}
5+
6+
enum(string) Type {
7+
Crushing = "create:crushing",
8+
Cutting = "create:cutting",
9+
Deploying = "create:deploying",
10+
Emptying = "create:emptying",
11+
Filling = "create:filling",
12+
Haunting = "create:haunting",
13+
ItemApplication = "create:item_application",
14+
MechanicalCrafting = "create:mechanical_crafting",
15+
Milling = "create:milling",
16+
Mixing = "create:mixing",
17+
Pressing = "create:pressing",
18+
SandpaperPolishing = "create:sandpaper_polishing",
19+
SequencedAssembly = "create:sequenced_assembly",
20+
Splashing = "create:splashing",
21+
}
22+
23+
struct NBT {
24+
Bottle?: ("REGULAR" | "SPLASH" | "LINGERING"),
25+
Potion?: string,
26+
}
27+
28+
type ItemOrTag = (
29+
struct {
30+
item: string,
31+
} | struct {
32+
tag: string,
33+
}
34+
)
35+
36+
type FluidOrTag = (
37+
struct {
38+
fluid: string,
39+
amount: int @ 1..,
40+
nbt?: NBT,
41+
} | struct {
42+
fluidTag: string,
43+
amount: int @ 1..,
44+
nbt?: NBT,
45+
}
46+
)
47+
48+
dispatch create:recipes[create:crushing] to struct {
49+
processingTime: int @ 1..,
50+
ingredients: [ItemOrTag] @ 1,
51+
results: [struct {
52+
chance?: float @ 0..,
53+
count?: int @ 1..,
54+
item: string,
55+
}] @ 1..,
56+
}
57+
58+
dispatch create:recipes[create:cutting] to struct {
59+
processingTime: int @ 1..,
60+
ingredients: [struct {
61+
item?: string, // Make the user select only one
62+
tag?: string,
63+
count?: int @ 1..,
64+
}] @ 1,
65+
results: [struct {
66+
item: string,
67+
count?: int @ 1..,
68+
}] @ 1,
69+
}
70+
71+
dispatch create:recipes[create:deploying] to struct {
72+
/// The first object is the base item and the second object is the ingredient
73+
ingredients: [ItemOrTag] @ 2,
74+
keepHeldItem?: boolean,
75+
results: [struct {
76+
item: string,
77+
}] @ 1,
78+
}
79+
80+
dispatch create:recipes[create:emptying] to struct {
81+
ingredients: [ItemOrTag] @ 1,
82+
results: [struct {
83+
item: string,
84+
count?: int @ 1..,
85+
}, struct {
86+
fluid: string,
87+
amount: int @ 1..,
88+
}],
89+
}
90+
91+
dispatch create:recipes[create:filling] to struct {
92+
ingredients: [ItemOrTag, FluidOrTag],
93+
results: [struct { item: string }] @ 1,
94+
}
95+
96+
dispatch create:recipes[create:haunting] to struct {
97+
ingredients: [ItemOrTag] @ 1,
98+
results: [struct {
99+
chance?: float @ 0..,
100+
count?: int @ 1..,
101+
item: string,
102+
}] @ 1..,
103+
}
104+
105+
dispatch create:recipes[create:item_application] to struct {
106+
/// The first object is the base item and the second object is the ingredient
107+
ingredients: [ItemOrTag] @ 2,
108+
results: [struct {
109+
item: string,
110+
}] @ 1,
111+
}
112+
113+
dispatch create:recipes[create:mechanical_crafting] to struct {
114+
acceptMirrored?: boolean,
115+
/// Warning: JEI will not display recipes greater in size than 9x9
116+
pattern: [string],
117+
key: struct {
118+
[string]: ItemOrTag,
119+
},
120+
result: struct {
121+
count?: int @ 1..,
122+
item: string,
123+
},
124+
}
125+
126+
dispatch create:recipes[create:milling] to struct {
127+
processingTime: int @ 1..,
128+
ingredients: [ItemOrTag] @ 1,
129+
results: [struct {
130+
chance?: float @ 0..,
131+
count?: int @ 1..,
132+
item: string,
133+
}] @ 1..,
134+
}
135+
136+
dispatch create:recipes[create:mixing] to struct {
137+
heatRequirement?: ("heated" | "superheated"),
138+
ingredients: [(struct {
139+
count: int @ 1..,
140+
item: string,
141+
} | struct {
142+
count: int @ 1..,
143+
tag: string,
144+
} | struct {
145+
fluid: string,
146+
amount: int @ 1..,
147+
nbt?: NBT,
148+
} | struct {
149+
fluidTag: string,
150+
amount: int @ 1..,
151+
nbt?: NBT,
152+
})] @ 1..,
153+
results: [(struct {
154+
count: int @ 1..,
155+
item: string,
156+
} | struct {
157+
fluid: string,
158+
amount: int @ 1..,
159+
nbt?: NBT,
160+
})] @ 1,
161+
}
162+
163+
dispatch create:recipes[create:pressing] to struct {
164+
ingredients: [ItemOrTag] @ 1,
165+
results: [struct {
166+
item: string,
167+
count?: int @ 1..,
168+
}] @ 1,
169+
}
170+
171+
dispatch create:recipes[create:sandpaper_polishing] to struct {
172+
ingredients: [ItemOrTag] @ 1,
173+
results: [struct {
174+
item: string,
175+
count?: int @ 1..,
176+
}] @ 1,
177+
}
178+
179+
dispatch create:recipes[create:sequenced_assembly] to struct {
180+
ingredient: ItemOrTag,
181+
loops: int @ 1..,
182+
results: [struct {
183+
chance?: float @ 0..,
184+
count?: int @ 1..,
185+
item: string,
186+
}],
187+
sequence: [Recipes],
188+
transitionalItem: struct {
189+
item: string,
190+
},
191+
}
192+
193+
dispatch create:recipes[create:splashing] to struct {
194+
ingredients: [ItemOrTag] @ 1,
195+
results: [struct {
196+
chance?: float @ 0..,
197+
count?: int @ 1..,
198+
item: string,
199+
}] @ 1..,
200+
}

src/config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,13 @@
801801
"dependency": "sky_aesthetics",
802802
"minVersion": "1.21.1",
803803
"wiki": "https://github.com/TathanDev/SkyAesthetics/wiki/Custom-Sky"
804+
},
805+
{
806+
"id": "create:recipes",
807+
"url": "create/recipes",
808+
"path": "create",
809+
"tags": ["partners"],
810+
"dependency": "create"
804811
}
805812
],
806813
"legacyGuides": [

src/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"generator.cat_variant": "Cat Variant",
7070
"generator.chat_type": "Chat Type",
7171
"generator.cow_variant": "Cow Variant",
72+
"generator.create:recipes": "Create Recipes",
7273
"generator.damage_type": "Damage Type",
7374
"generator.dialog": "Dialog",
7475
"generator.dimension": "Dimension",
@@ -193,6 +194,7 @@
193194
"normalize": "Normalize",
194195
"not_found.description": "The page you were looking for does not exist.",
195196
"output_settings": "Output settings",
197+
"partner.create": "Create",
196198
"partner.fabric": "Fabric",
197199
"partner.immersive_weathering": "Immersive Weathering",
198200
"partner.lithostitched": "Lithostitched",

0 commit comments

Comments
 (0)