#Thermal bottler - potions

20 messages · Page 1 of 1 (latest)

zealous drift
#

So... this works.

event.custom({
    "type": "thermal:bottler",
    "ingredients": [
        {"item": "minecraft:glass_bottle"},
        {
            "fluid": "create:potion",
            "amount": 250,
            "nbt": {"Potion": "minecraft:strong_leaping", "Bottle": "REGULAR"}
        }
    ],
    "result": [{"item": "minecraft:rotten_flesh"}]
})

However, it seems I cannot replace fluid with tag. I would like to define this with the minecraft:potion tag so that I do not need separate recipes for create:potion, tconstruct:potion, immersiveengineering:potion and so forth. Is this possible? And how would I determine if something like this is possible, in general? That way I don't have to ask for all kinds of recipe types, because I have come across similar things before where I would like to define an accepted fluid, but can only seem to use a tag for example.

lament fractalBOT
#

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

charred moat
#

there's just no standard for how a fluid tag is serialized, so you have to check how the mod itself expects that to be labeled. The key for a fluid tag in thermal is fluid_tag

zealous drift
#

Setting fluid_tag to forge:potion worked. Do you mind dropping a link to where you found the name of the serialization key? Is there going to be a certain file in a known path or location in the jar that I can look to find these keys, or is it just going to be random as well? Up till now I have just been looking at the recipe JSON files for clues

zealous drift
#

I lied. I thought this was working but I can't seem to get it to function properly with non cofh_core potion fluids.

#

hold on, I think I might just be dumb

#

confirmed 😂

charred moat
#

I couldn't tell you off the top of my head where to find it, probably somewhere in cofh_core (or you just look through existing recipes), I just remember from personal experience/knew where to look for the answer in my own kjs recipes

zealous drift
#

alright, np

zealous drift
#

Alright, I cannot understand why this is happening... The following recipe works for cofh_core, IE, and tconstruct potion fluids

event.custom({
    "type": "thermal:bottler",
    "ingredients": [
        {"item": "minecraft:glass_bottle"},
        {
            "fluid_tag": "forge:potion",
            "amount": 250,
            "nbt": {"Potion": "minecraft:leaping"}
        }
    ],
    "result": [{"item": "minecraft:potion","nbt": {"Potion": "minecraft:leaping"}}]
})

However, when I try to programatically construct recipes similar to how I did with the IE bottling machine, the potion that always comes out of the Thermal bottler is a knockback resistance potion.

    const mk_fluid_encap_recipes = (pTag) => {
        let rID = ""
        for (var z = botTypes.length - 1; z >= 0; z--) {
            rID = 'kjs:forgea/' + botTypes[z][1].split(':')[1].split('_')[0] + '/' + pTag.split(':')[1]

            event.custom({
                "type": "thermal:bottler",
                "ingredients": [
                    {"item": botTypes[z][1]},
                    {
                        "fluid_tag": "forge:potion",
                        "amount": 250,
                        "nbt": {"Potion": pTag}
                    }
                ],
                "result": [{"item": botTypes[z][0],"nbt": {"Potion": pTag}}]
            }).id(rID)
        }
    }

I have the following lists feeding into this

let botTypes = [
        ['minecraft:potion','minecraft:glass_bottle'],
        ['minecraft:splash_potion','tconstruct:splash_bottle'],
        ['minecraft:lingering_potion','tconstruct:lingering_bottle']
    ]

And
pTag is just a tag, like 'minecraft:water' and 'minecraft:leaping' and 'alexsmobs:long_knockback_resistance' from a really long list of every potion type in my modpack

#

JEI shows the recipe correctly

#

And the fluid is cycling through all but create's potion fluid (because I haven't coded that in yet)

#

Full script so far, might make it easier. But I am getting the feeling it is not my code, it is some sort of quirk with Thermal bottler? The IE bottler works perfectly

humble ravineBOT
#

Paste version of potion_integration.js from @zealous drift

zealous drift
#

Ok so, actually, it doesn't matter what the potion fluid in the Thermal bottler is, but depending on the item insert, I get a slightly different potion.

A glass bottle gives me a knockback resistance potion from alex's mobs, a tconstruct splash bottle gives me a resilience potion from quark, and a tconstruct lingering bottle gives me a harming potion from minecraft

#

So... if I comment out all of the loop, so that the only recipe that is registered is the manually written minecraft:leaping potion one, I have realized that every potion fluid then turns into a minecraft leaping potion. If I change this to minecraft:swiftness I always get a minecraft swiftness potion. However, if I add a second manual minecraft potion recipe, so that both swiftness and leaping recipes are registered, I only ever get leaping potions out. So something with thermal recipes is causing these to overwrite each other

#

I think maybe the recipe is not taking the nbt data into account for the input fluid

zealous drift