KubeJS

KubeJS

69M Downloads

Fabric 1.18 - Adding smelting recipes with xp does not give xp

Spirevipp opened this issue ยท 4 comments

commented

Hi,

I have added the following script to add recipes for smelting the raw ore blocks, with the same amount of total xp as each item would have given. The recipes works, item get smelted, but no xp is rewarded. This is running on a server, but it also does not work in singleplayer.
I do have several other mods also installed.

script.js
// priority: 0
onEvent('recipes', (event) => {
    const recipes = [
    	{
            output: 'minecraft:rabbit_hide',
            input: 'minecraft:rotten_flesh',
            includeBlasting: false,
            includeSmoking: true,
            includeCook: true,
            xp: 0.35,
            id: 'rotten_flesh_rabbit_hide'
        },
        {
            output: 'minecraft:iron_block',
            input: 'minecraft:raw_iron_block',
            includeBlasting: true,
            includeSmoking: false,
            includeCook: false,
            xp: 6.3,
            id: 'raw_ore_block_iron_block'
        },
        {
            output: 'minecraft:gold_block',
            input: 'minecraft:raw_gold_block',
            includeBlasting: true,
            includeSmoking: false,
            includeCook: false,
            xp: 9.0,
            id: 'raw_ore_block_gold_block'
        },
        {
            output: 'minecraft:copper_block',
            input: 'minecraft:raw_copper_block',
            includeBlasting: true,
            includeSmoking: false,
            includeCook: false,
            xp: 6.3,
            id: 'raw_ore_block_copper_block'
        }
    ];

    recipes.forEach((recipe) => {
        event.smelting(recipe.output, recipe.input).id(recipe.id+'_smelt').xp(recipe.xp)
    
        if (recipe.includeBlasting) {
            event.blasting(recipe.output, recipe.input).id(recipe.id+'_blast').xp(recipe.xp)
        }
        if (recipe.includeSmoking) {
            event.smoking(recipe.output, recipe.input).id(recipe.id+'_smoke').xp(recipe.xp)
        }
        if (recipe.includeCook) {
            event.campfireCooking(recipe.output, recipe.input).id(recipe.id+'_cook').xp(recipe.xp)
        }
    });
});

fabric 0.12.8

fabric-api 0.44.0+1.18

rhino 1800.1.6-build.81

kubejs 1800.4.0-build.230

architectury 3.1.45

Modlist (printed from directory)
appleskin-fabric-mc1.18-2.2.0.jar

architectury-3.1.45.jar

balm-fabric-2.1.1+0.jar

BetterControls-Fabric-1.18+v1.2.2.jar

BowInfinityFix-1.18.x-fabric-rv11.jar

carpet-extra-1.18-1.4.56.jar

clickthrough-1.18-fabric0.43.1-0.4.jar

cloth-api-2.0.54.jar

cloth-config-6.0.45-fabric.jar

cpas-3.0.0.jar

craftingtweaks-fabric-1.18-13.0.0.jar

CraftPresence-Fabric-1.18-Release-1.8.8.jar

diggusmaximus-1.5.2-1.18.jar

easiercrafting-1.18-fabric0.43.1-1.7.jar

eggtab-2.1.0+1.16-fabric.jar

fabric-api-0.44.0+1.18.jar

fabric-carpet-1.18-1.4.56+v211130.jar

fallingleaves-1.8.0+1.18.jar

graves-1.2.2+1.18.jar

grind-enchantments-1.4.0+1.17.1.jar

illuminations-1.10.2.jar

indium-1.0.2-alpha1+mc1.18.jar

InventoryHUD-fabric-[1.18]+-3.4.2.jar

InventoryProfilesNext-fabric-1.18-1.2.0.jar

iris-mc1.18-1.1.3.jar

justenoughkeys-0.4.3-fabric.jar

kubejs-fabric-1800.4.0-build.230.jar

lambdynamiclights-2.1.0+1.17.jar

light-overlay-6.0.4.jar

litematica-fabric-1.18.0-0.0.0-dev.20211203.013300.jar

malilib-fabric-1.18.0-0.10.0-dev.26.jar

minihud-fabric-1.18.0-0.19.0-dev.20211204.230657.jar

modlist.txt

modmenu-3.0.0.jar

MouseTweaks-fabric-mc1.18-2.16.jar

NE-1.18-Fabric-1.2.0.jar

quickshulker-1.3.1-1.18.jar

rebind-narrator-1.18-1.0.0.jar

reeses_sodium_options-mc1.18-1.2.3.jar

rhino-fabric-1800.1.6-build.81.jar

rightclickharvest-1.5.1.jar

RoughlyEnoughItems-7.0.346.jar

slight-gui-modifications-2.0.2.jar

sodium-extra-mc1.18-0.3.7.jar

sodium-fabric-mc1.18-0.4.0-alpha5+build.9.jar

tooltipfix-1.0.4-1.18.jar

tweakeroo-fabric-1.18.0-0.10.0-dev.20211204.230726.jar

wthit-fabric-4.3.1.jar

XaerosWorldMap_1.18.6.1_Fabric_1.18.jar

Xaeros_Minimap_21.22.3.1_Fabric_1.18.jar
commented

Need to test in Forge to see if this is a Fabric exclusive bug

commented

Is this still an issue? iirc Fabric in general has had smelting issues without Kube as well, and I'd like to know whether this is on our end or on theirs

commented

(For reference, it might also be worth checking if adding them manually by JSON also doesn't give you XP)

commented

Closing due to a lack of response. Feel free to reopen if the issue still persists