Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to add brewery recipe using kubejs #2428

Open
2 tasks done
robbert229 opened this issue Nov 24, 2024 · 1 comment
Open
2 tasks done

unable to add brewery recipe using kubejs #2428

robbert229 opened this issue Nov 24, 2024 · 1 comment
Labels
type: bug Something isn't working

Comments

@robbert229
Copy link

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.

@robbert229 robbert229 added the type: bug Something isn't working label Nov 24, 2024
@robbert229
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant