#Schema for Integrated Dynamics Mechanical Squeezer

20 messages · Page 1 of 1 (latest)

alpine frost
#

I've been bashing my head against this problem all day, trying to create a schema script to handle the Integrated Dynamics recipe types. The drying basins are fairly straightforward, but the squeezers are a little weird in their outputs.

Example recipe: https://github.com/CyclopsMC/IntegratedDynamics/blob/master-1.20-lts/src/main/resources/data/integrateddynamics/recipes/mechanical_squeezer/base/menril_resin_logs.json

You can see that the item on line 12 is nested more than the one on line 17. It seems to be consistent that items with a count are nested one level deeper, unless they use a tag (see line 9 here: https://github.com/CyclopsMC/IntegratedDynamics/blob/master-1.20-lts/src/main/resources/data/integrateddynamics/recipes/mechanical_squeezer/ore/gem_diamond.json) in which they're not nested further.

Additionally, the results key contains either one or both of an array of items and a fluid to output.

This is the closest I was able to get to it working: https://github.com/jangro/beyond-the-horizon/blob/main/kubejs/startup_scripts/src/schemas/integrateddynamics.js, where the server logs no longer show warnings when trying to parse the recipes included with ID. Unfortunately, I can't figure out the next steps to take to be able to add recipes through KubeJS - I presume there's some way to clean up / rework the schema so that a recipe like this one would work:

event.recipes.integrateddynamics.mechanical_squeezer([Item.of('irons_spellbooks:arcane_salvage'), Item.of('irons_spellbooks:arcane_salvage').withChance(0.75)], 'irons_spellbooks:arcane_debris', 40).id(`${ID_PREFIX}mechanical_squeezer/arcane_salvage_from_arcane_debris`);```
But currently it's rather broken:  `Failed to create recipe for type 'integrateddynamics:mechanical_squeezer': Unable to cast 'result:builder{items?:{builder{item:output_item,chance?:float}|output_item}[],fluid?:output_fluid}' value '[irons_spellbooks:arcane_salvage, 'irons_spellbooks:arcane_salvage']' to 'builder'!`
GitHub

A Minecraft mod to take full and automated control of your appliances. - CyclopsMC/IntegratedDynamics

west juniperBOT
#

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

alpine frost
#

I'm not surprised to get that error given the mess that things are in, but given the lack of documentation and examples for more complex schemas I'm not sure what to try next.

At this point I need some advice from somebody much more experienced with KubeJS schemas than I am. Please help! ❤️

coarse ivy
#

do you know if the simple squeezer also does not work?

#

@alpine frost

alpine frost
#

It does not.

coarse ivy
#

💀

alpine frost
#

The recipe formats are virtually identical between the two, with the exception that the regular squeezer has no duration.

#

I'm just not sure how to deal with both the item and fluid outputs being in the same result object, as well as the weird nesting of the output items in certain cases.

#

I need to summon ChiefArug or something, but not sure how he feels about being pinged.

alpine frost
#

I was looking at that, but I don't know enough about schemas / recipe components / similar KJS stuff to figure out how to translate that into anything useful.

ionic apex
#
event.custom({
        "type": "integrateddynamics:squeezer",
        "item": 'ars_nouveau:sourceberry_bush',
        "result": {
            "fluid": {
                "fluid": 'starbunclemania:source_fluid',
                "amount": 100
            },
            "item": 'minecraft:air'
        }
    }).id('kubejs:source_berry_squeezin')

event.custom({
        "type": "integrateddynamics:mechanical_squeezer",
        "item": 'ars_nouveau:sourceberry_bush',
        "result": {
            "fluid": {
                "fluid": 'starbunclemania:source_fluid',
                "amount": 100
            },
            "item": 'minecraft:air'
        },
        "duration": 20
    }).id('kubejs:source_berry_mech')
#

both these were working for me on 1.20.1

#

if you want your output to have an item and no fluid, I'm not sure what the recipe scheme would be for that, sorry

#

oh I'm sorry this is probably less than helpful, because you're tryign to build a schema

#

ignore if not useful 😦

alpine frost
#

Oh yeah, I have a working script to handle it via event.custom(...), but I want to use a schema so that things like replaceInput and replaceOutput work with it.

ionic apex
#

sorry yeah I get that now that I reread the title LMAO