KubeJS (Old)

KubeJS (Old)

3M Downloads

Custom Ingredients not working on Fabric

Vaelzan opened this issue · 3 comments

commented

Testing with this recipe (from the documentation, but with two typos fixed that have been discussed on Discord):

event.shapeless('9x minecraft:melon_slice', [ // Craft 9 watermelon slices
    Item.of('minecraft:diamond_sword').ignoreNBT(), // Diamond sword that ignores damage
    'minecraft:melon' // Watermelon block
  ]).damageIngredient(Item.of('minecraft:diamond_sword').ignoreNBT()) // Damage the sword (also has to ignore damage or only 0 damage will work)

The sword vanishes entirely with kubejs-fabric-1800.4.0-build.238, but is damaged correctly in the corresponding Forge version. The recipe output works in both.

commented

Custom ingredients are not supported in Fabric since Fabric API has no suitable alternative we could use as of right now, this same could should work properly on Forge though as you said

commented

Turning this into a more general issue for custom ingredient support on Fabric (this includes things like ignoreNBT() and weakNBT())

commented

With the introduction of Fabric‘s in house custom Ingredient API, this is no longer an issue on 1.19.2+ (KubeJS 6 and above)

Given that the only alternative for <= 1.18 is depending on Ingredient Extension API, this will likely not be backported.