FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
21 stars 1 forks source link

Tag in dripper recipe doesn't work #225

Open Hideki2D opened 2 years ago

Hideki2D commented 2 years ago

Mod

FTB Dripper

Description

Hello, i use dripper, i want to create custom recipe with any minecraft:planks by using forge tag, but this doesn't work with datapack and also with kubejs, can you suggest what is the problem?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Raidobw2 commented 2 years ago

We'll have to make documentation for it. If you want examples with KubeJS, you can install OceanBlock and check the file at kubejs/server_scripts/mods/recipes.ftbdripper.js.

If you use a tag like this as input then it would normally be like this: inputBlock: "#minecraft:planks"

Hideki2D commented 2 years ago

I using this script:

onEvent('recipes', event => { event.recipes.ftbdripperDrip({ inputBlock: '#minecraft:planks', inputItem: '#minecraft:planks', outputBlock: 'immersiveengineering:treated_wood_horizontal', outputItem: 'immersiveengineering:treated_wood_horizontal', fluid: 'immersiveengineering:creosote' }) });

but this recipe doesn't work, if i change #minecraft:planks for example to minecraft:oak_planks then it works

MichaelHillcox commented 2 years ago

I can look at this if it's a confirmed bug

Raidobw2 commented 2 years ago

Until our dev can look at this more in depth, use this:

onEvent('recipes', event => {
    //Get all wood planks
    const allWoodPlanks = Ingredient.of('#minecraft:planks').itemIds;

    //For each wood plank, we add a dripper recipe
    allWoodPlanks.forEach((woodPlank) => {

        //Substitute the wooden plank into the recipe as a variable instead of string
        event.recipes.ftbdripperDrip({
            inputBlock: woodPlank,
            outputBlock: 'immersiveengineering:treated_wood_horizontal',
            fluid: 'immersiveengineering:creosote',
            chance: 1
        });
    });
});

When I had it tested with wood to stone at first, it worked. You'll have multiple recipes but all wood planks will be there. image image Cheers