#a ticket for some other recipe schema creation

65 messages · Page 1 of 1 (latest)

shell path
#
{
    "type":"immersiveengineering:mixer",
    "energy":3200,
    "fluid":{
        "amount":500,
        "tag":"forge:ethanol"
    },
    "inputs":[
        {
            "item":"minecraft:apple"
        },{
            "item":"minecraft:sugar"
        }
    ],
    "result":{
        "amount":500,
        "fluid":"tmted:apple_cider"
    }
}

so that becomes

    event.register('immersiveengineering:mixer', new $RecipeSchema(
        result,
        input,
        Components.get('intNumber')().key('energy'),
        Components.get('intNumber')().key('maxChargeRate').optional(2147483647)
    ))

this and done?

uneven yewBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

undone lake
#

what is result, what is input

shell path
#

result is fluid and input is items and fluid

undone lake
#

i mean the variables

shell path
#

oh

#

ahm do need to look inside the jar to find out?

undone lake
#

no...

#

in the code snippet that you copied and seemingly have no idea how it works, there are two variables

shell path
#

xddd hey you are ... correct

undone lake
#

for this recipe youll need a diffefernet type of component for most of the keys. Ill list them below:
energy: intNumber
fluid: inputFluid
inputs: inputItemArray
result: outputFluid

#

thats basically it

#

the energy one is already there, you should be able to work out how the rest work from that

shell path
#

oh aww thanks ^w^

#

ill try :>

undone lake
#

note that the order you put them in will become the order they are needed in the event.recipes.thingy() thing, so dont put it in a random order

shell path
#

oh but i can change it without needing to follow the order of the recipe json?

undone lake
#

yeah, the order of the recipe json doenst matter

shell path
#

nice

#

this is what i have for now but im guessing i need to do more and change ssome stuff

    const fluidoutput = Components.get('outputFluid')().or(
        new $RecipeComponentBuilder(2)
            .add(Components.get('tag')({ registry: 'fluid' }).key('fluidTag'))
            .add(Components.get('intNumber')().key('amount'))
            .inputRole()).key('output')

    event.register('immersiveengineering:mixer', new $RecipeSchema(
        fluidOrTagInput,
        input,
        fluidoutput,
        Components.get('intNumber')().key('energy'),
    ))
undone lake
#

none of that looks like the energy one

shell path
#

xd thank you

#

from what i see the input can just be an array but also

"inputs": [
        {
            "tag": "forge:dusts/redstone"
        }
    ],

include a base ingredient

             },
    "inputs": [
        {
            "base_ingredient": {
                "tag": "forge:sand"
            },
            "count": 2
        },
        {
            "tag": "forge:gravel"
        },
        {
            "tag": "forge:clay"
        }
    ],
#

which i ahm not sure how to do that

undone lake
#

ah... yeah thats a lot harder

#

quite significantly so

shell path
#

xd shit

#

the thing is

#

im not even sure what the base ingredient is, it looks just like another input and nothing more

#

like do i even need that then?

undone lake
#

probably not

shell path
#

yey :D

#

okkk

#
StartupEvents.recipeSchemaRegistry(event => {
    const Components = event.components
    const result = Components.get('outputItem')().key('result')
    const input = Components.get('inputItem')().key('input')
    const inputs = Components.get('inputItemArray')().key('inputs')
    const inputfluid = Components.get('inputFluid')().key('inputfluid')
    const fluidoutput = Components.get('outputFluid')().key('fluidoutput')

    event.register('immersiveengineering:mixer', new $RecipeSchema(
        inputfluid,
        inputs,
        fluidoutput,
        Components.get('intNumber')().key('energy'),
    ))
})

better?

shell path
#

oh anddd thiss thingy

    event.register('createaddition:liquid_burning', new $RecipeSchema(
        burnTime,
        fluidOrTagInput,
        Components.get('bool')().key('superheated').optional(false)
    ))

so heated is default and so you only need to have a bool for superheated right?

#

oh busy? sure take your time :>

undone lake
#

i dont reccomend using variables when you are just starting out

undone lake
shell path
#

ohhhhhh ok ok

undone lake
#

you have the keys wrong

#

they need to be the same as in the json

shell path
undone lake
#

the order doesnt need to be the same

#

but the keys need to be

shell path
#

ohhhh ok

#
StartupEvents.recipeSchemaRegistry(event => {
    const Components = event.components
    const result = Components.get('outputItem')().key('result')
    const input = Components.get('inputItem')().key('input')
    const inputs = Components.get('inputItemArray')().key('inputs')
    const inputfluid = Components.get('inputFluid')().key('inputfluid')
    const fluidoutput = Components.get('outputFluid')().key('fluidoutput')

    event.register('immersiveengineering:mixer', new $RecipeSchema(
        Components.get('intNumber')().key('energy'),
        inputfluid,
        inputs,
        fluidoutput,
    ))
})

so likee this?

undone lake
#

🤦‍♂️

#

the only thing you changed there is the order

#

the thing i said doesnt matter

#

the key is the thing you need to change

#

look at the bit in your code that says key, and change the thing by that.
Look at the energy example to see what it needs to be (it should be the same as a part of the json)

shell path
#

... OHHHHHHHHHHHH

#

i fought the wwholee components where keys

#

xd sorry my bad

shell path
#

sorry i was just trying to make my own

undone lake
#

it should be changed to what it is in the json

#

so for the recipe's fluid output it should be Components.get('outputFluid')().key('result') because result is what it is called in the json

shell path
urban junco
#

@shell path Hey! Do you have any completed IE schemas you can share? 🙂