event.recipes.createSequencedAssembly([ // start the recipe
Item.of('5x create:track'),
], 'minecraft:smooth_stone_slab', [ // 'create:brass_ingot' is the input.
// the transitional item set by "transitionalItem('create:incomplete_large_cogwheel')" is the item that will be used during the recipe as the item that the input is using to transition to the output.
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createFilling('create:incomplete_track', ['create:incomplete_track',Fluid.of('createmetalwork:molten_andesite_alloy', 5000)]),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track'), // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']), // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'create_dd:steel_nugget']), // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track') // like a normal recipe function, is used as a sequence step in this array. Input and output have the transitional item
]).transitionalItem('create:incomplete_track').loops(0) // set the transitional item and the loops (amount of repetitions)
const tracks = [
'acacia',
'birch',
'crimson',
'dark_oak',
'jungle',
'oak',
'spruce',
'warped',
'blackstone',
'ender',
];
tracks.forEach(t => event.recipes.createSequencedAssembly([
Item.of('5x create:track_', + t ),
], 'minecraft:smooth_stone_slab', [
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createFilling('create:incomplete_track', ['create:incomplete_track',Fluid.of('createmetalwork:molten_andesite_alloy', 5000)]),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track'),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'create_dd:steel_nugget']),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track')
]).transitionalItem('create:incomplete_track').loops(0)
)```
https://i.imgur.com/vjc7ldj.png
The recipe resulting in `create:track` works fine, but the 2nd part of the script where I attempted to write more efficient code for `create:track_dark_oak`, etc did not work. Frankly I don't know what I'm doing 
What did I do wrong and how can I fix it?
#How to write forEach for Create Sequence Assembly recipes
34 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
line #292 is
tracks.forEach(t => event.recipes.createSequencedAssembly([
create only have standard tracks in the mod 😉 you have create steam 'n' rails in your pack?
and the two output lines are incorrect 😉
the first one should look like:
Item.of("create:track", 5)
and the second:
Item.of("railways:track_" + t, 5)
👍
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue!
This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You should create a new post for unrelated issues.
Ticket re-opened!
One more thing, how do I correctly add a bonus output to this particular recipe?
This one shows no errors but the recipe is no longer present (should be 2 pages instead of 1): https://i.imgur.com/POyLqp8.png
tracks.forEach(t => event.recipes.createSequencedAssembly([ // start the recipe
Item.of('create:experience_nugget').withChance(32.0),
Item.of("railways:track_" + t, 5)
], 'minecraft:smooth_stone_slab', [
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createFilling('create:incomplete_track', ['create:incomplete_track',Fluid.of('createmetalwork:molten_andesite_alloy', 4500)]),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track'),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'create_dd:steel_nugget']),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track')
]).transitionalItem('create:incomplete_track').loops(0)
)```
I got "something" to work, but this documentation claims the items without Item.of would be guaranteed output, when all it does is make both the track and the extra drop a part of the chance pool
tracks.forEach(t => event.recipes.createSequencedAssembly([ // start the recipe
Item.of("railways:track_" + t, 5),
Item.of("railways:track_" + t, 1).withChance(1.0),
'create:experience_nugget'
], 'minecraft:smooth_stone_slab', [
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createFilling('create:incomplete_track', ['create:incomplete_track',Fluid.of('createmetalwork:molten_andesite_alloy', 4500)]),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track'),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'minecraft:iron_nugget']),
event.recipes.createDeploying('create:incomplete_track', ['create:incomplete_track', 'create_dd:steel_nugget']),
event.recipes.createPressing('create:incomplete_track', 'create:incomplete_track')
]).transitionalItem('create:incomplete_track').loops(0)
)
Not sure what I'm doing wrong
(disregard that i put the track as a chance drop, i tried reversing and it still didnt give me what i wanted)
no you only get one item and not a second in addition
so its not possible to add a chance drop to this recipe?
it is possible but not as a second addition output for example:
tracks.forEach(t => event.recipes.createSequencedAssembly([
Item.of("railways:track_" + t, 5).withChance(0.6),
Item.of("railways:track_" + t, 1).withChance(0.2),
Item.of('create:experience_nugget').withChance(0.2)
], 'minecraft:smooth_stone_slab', [
you get the 5 track with 60 % chance, the nuggets and the track with count 1 have booth each 20% chance
so you either get 5 tracks, or only 1 or the nuggets
gotcha
event.recipes.createSequencedAssembly([
Item.of("create:precision_mechanism", 3)
], 'create:golden_sheet', [
event.recipes.createFilling('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism',Fluid.of('createmetalwork:molten_andesite_alloy', 4500)]),
event.recipes.createDeploying('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism', 'create:cogwheel']),
event.recipes.createDeploying('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism','create:large_cogwheel']),
event.recipes.createDeploying('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism','minecraft:repeater']),
event.recipes.createDeploying('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism', 'create:iron_nugget']),
event.recipes.createDeploying('create:incomplete_precision_mechanism', ['create:incomplete_precision_mechanism', 'createaddition:electrum_wire']),
]).transitionalItem('create:incomplete_precision_mechanism').loops(3)
I dont know what happened but this recipe does not appear in JEI
KubeJS says no errors
I'm guessing the issue is your filling recipe fluid not existing
such as due to a typo
anyway, this is unrelated
This seems pretty unrelated - are you sure that it's related to your original issue? For simplicity and everyone else's sake, please create a new ticket. This also helps others that try to help you, as they may know how to fix x, but your ticket is still called y. Don't rename it either, then others looking for y won't be able to find it! -> #1047320998199955458