GregTechCEu Modern

GregTechCEu Modern

6M Downloads

unable to add brewery recipe using kubejs

robbert229 opened this issue ยท 1 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

v1.4.6

Minecraft Version

1.20.1

Recipe Viewer Installed

EMI

Environment

Multiplayer

Cross-Mod Interaction

No

Other Installed Mods

Gravitas^2

Expected Behavior

When I add the following snippet into a kubejs file that is already adding a number of other recipes that snippet will result in the creation of a new recipe in game.

    event.recipes.gtceu.brewery(`tfc_brewing_biomass_straw`)
        .itemInput(`tfc:straw`)
        .inputFluid(Fluid.of("minecraft:water", 20))
        .outputFluid(Fluid.of("gtceu:biomass", 20))
        .EUt(LV)
        .duration(160);

Actual Behavior

The recipe is not created, and an error occurs in the kubejs logs

[21:57:10] [KubeJS Recipe Event Worker 0/ERROR] [GregTechCEu/]: No key duration in MapLike[{"type":"gtceu:brewery"}]                                                                                                                        [21:57:10] [KubeJS Recipe Event Worker 0/WARN] [KubeJS Server/]: Error parsing recipe gtceu:brewery/tfc_brewing_biomass_straw[gtceu:brewery]: {"type":"gtceu:brewery"}: No key duration in MapLike[{"type":"gtceu:brewery"}] 

Steps to Reproduce

Introduce a kubejs snippet for new brewery recipe, trigger kubejs to reload.

Additional Information

I am able to add recipes for all the other machines without issue.

commented

I did a bit more research here:

I was able to specify a recipe via kubejs/data/gtceu/recipes/brewery/test.json

{
    "type": "gtceu:brewery",
    "duration": 128,
    "inputs": {
        "item": [
            {
                "content": {
                    "type": "gtceu:sized",
                    "count": 1,
                    "ingredient": {
                        "item": "tfc:powder/lime"
                    }
                },
                "chance": 10000,
                "maxChance": 10000,
                "tierChanceBoost": 0
            }
        ],
        "fluid": [
            {
                "content": {
                    "amount": 750,
                    "value": [
                        {
                            "tag": "forge:water"
                        }
                    ]
                },
                "chance": 10000,
                "maxChance": 10000,
                "tierChanceBoost": 0
            }
        ]
    },
    "outputs": {
        "fluid": [
            {
                "content": {
                    "amount": 750,
                    "value": [
                        {
                            "fluid": "gtceu:biomass"
                        }
                    ]
                },
                "chance": 10000,
                "maxChance": 10000,
                "tierChanceBoost": 0
            }
        ]
    },
    "tickInputs": {
        "eu": [
            {
                "content": 4,
                "chance": 10000,
                "maxChance": 10000,
                "tierChanceBoost": 0
            }
        ]
    },
    "tickOutputs": {},
    "inputChanceLogics": {},
    "outputChanceLogics": {},
    "tickInputChanceLogics": {},
    "tickOutputChanceLogics": {}
}

I still haven't been able to get the kubejs event.recipes.gtceu.brewery method to function.