Create

Create

86M Downloads

Sequenced assembly recipes broken with same starting procedure

LilJagty opened this issue ยท 2 comments

commented

Describe the Bug

Hi, I created a sequenced assembly recipe for each type of refined storage processor in this format. (raw, improved, advanced, neural- only difference is which raw processor type is deployed)
2022-06-19 (2)

When the process starts (the iron mechanical component is cut with a saw), Create automatically assumes that I'm trying to do the improved processor recipe even though there's four possibilities (and improved wasn't registered first or last.. whatever).
2022-06-19 (3)

Fortunately, when I deploy the raw processor I actually want to use (in this case, basic processor) it seems to visually update and know which type of processor I want to make.
2022-06-19 (4)

However, when the process is finished, I always end up with two improved processors. It doesn't matter how I complete the sequenced assembly or which raw processors I use, it always gives me improved processors. It seems that Create can't properly distinguish multiple sequenced assembly recipes that start with the same operation.

Here's the KubeJS Create script I used to make these recipes:

    // CHANGING PROCESSOR RECIPES
    event.remove({output: 'extrastorage:raw_neural_processor'});
    event.shapeless('extrastorage:raw_neural_processor', ['refinedstorage:processor_binding', '#forge:silicon', 'waystones:warp_stone', 'easy_villagers:villager']);
    event.remove({output: 'extrastorage:neural_processor'});
    event.recipes.createSequencedAssembly(
        Item.of('2x extrastorage:neural_processor'), 'immersiveengineering:component_iron', [
            event.recipes.createCutting('immersiveengineering:component_iron', 'immersiveengineering:component_iron').processingTime(50),
            event.recipes.createDeploying('immersiveengineering:component_iron', ['immersiveengineering:component_iron', 'extrastorage:raw_neural_processor']),
            event.recipes.createPressing('immersiveengineering:component_iron', 'extrastorage:neural_processor')
        ]).transitionalItem('immersiveengineering:component_iron').loops(2);

    event.remove({output: 'refinedstorage:basic_processor'});
    event.recipes.createSequencedAssembly(
        Item.of('2x refinedstorage:basic_processor'), 'immersiveengineering:component_iron', [
            event.recipes.createCutting('immersiveengineering:component_iron', 'immersiveengineering:component_iron').processingTime(50),
            event.recipes.createDeploying('immersiveengineering:component_iron', ['immersiveengineering:component_iron', 'refinedstorage:raw_basic_processor']),
            event.recipes.createPressing('immersiveengineering:component_iron', 'refinedstorage:basic_processor')
        ]).transitionalItem('immersiveengineering:component_iron').loops(2);

    event.remove({output: 'refinedstorage:improved_processor'});
    event.recipes.createSequencedAssembly(
        Item.of('2x refinedstorage:improved_processor'), 'immersiveengineering:component_iron', [
            event.recipes.createCutting('immersiveengineering:component_iron', 'immersiveengineering:component_iron').processingTime(50),
            event.recipes.createDeploying('immersiveengineering:component_iron', ['immersiveengineering:component_iron', 'refinedstorage:raw_improved_processor']),
            event.recipes.createPressing('immersiveengineering:component_iron', 'refinedstorage:improved_processor')
        ]).transitionalItem('immersiveengineering:component_iron').loops(2);

    event.remove({output: 'refinedstorage:advanced_processor'});
    event.recipes.createSequencedAssembly(
        Item.of('2x refinedstorage:advanced_processor'), 'immersiveengineering:component_iron', [
            event.recipes.createCutting('immersiveengineering:component_iron', 'immersiveengineering:component_iron').processingTime(50),
            event.recipes.createDeploying('immersiveengineering:component_iron', ['immersiveengineering:component_iron', 'refinedstorage:raw_advanced_processor']),
            event.recipes.createPressing('immersiveengineering:component_iron', 'refinedstorage:advanced_processor')
        ]).transitionalItem('immersiveengineering:component_iron').loops(2);

Reproduction Steps

  1. Make multiple sequenced assembly recipes with same starting operation
  2. Complete the procedures to craft each of the results
  3. Observe that only one of the multiple outputs can ever be obtained

Expected Result

I expected to be able to craft the processor type depending on which raw processor type I deployed.

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 10

Mod Version

0.4.0f

Minecraft Version

1.18.1

Forge Version

39.1.2

Other Mods

KubeJS
KubeJS Create

Additional Context

No response

commented

Okay, now I'm really stumped... I changed how the recipes work so that the first step in the process is deploying the raw processor type to differentiate the recipes, but the problem still persists (except everything turns into an advanced processor). I'm so confused

New script:
```
//CHANGING PROCESSOR RECIPES
let processors = [
'basic',
'improved',
'advanced'
];
let transitional = 'immersiveengineering:component_iron';

event.remove({output: 'extrastorage:raw_neural_processor'});
event.shapeless('extrastorage:raw_neural_processor', ['refinedstorage:processor_binding', '#forge:silicon', 'waystones:warp_stone', 'easy_villagers:villager']);
event.remove({output: 'extrastorage:neural_processor'});
event.recipes.createSequencedAssembly(
    Item.of('2x extrastorage:neural_processor'), transitional, [
        event.recipes.createDeploying(transitional, [transitional, 'extrastorage:raw_neural_processor']),
        event.recipes.createPressing(transitional, transitional),
        event.recipes.createCutting(transitional, transitional).processingTime(50)
    ]).transitionalItem(transitional).loops(2);

processors.forEach(processor => {
    event.remove({output: `refinedstorage:${processor}_processor`});
    event.recipes.createSequencedAssembly(
        Item.of(`2x refinedstorage:${processor}_processor`), transitional, [
            event.recipes.createDeploying(transitional, [transitional, `refinedstorage:raw_${processor}_processor`]),
            event.recipes.createPressing(transitional, transitional),
            event.recipes.createCutting(transitional, transitional).processingTime(50)
        ]).transitionalItem(transitional).loops(2);
});
commented

I'm an idiot. I didn't realize that registering a transitional item in the startup scripts was necessary. Sorry!