KubeJS (Old)

KubeJS (Old)

3M Downloads

Magma Crucible Recipe type ignores NBT

Jerome226 opened this issue ยท 2 comments

commented

Basically i have this:
event.recipes.thermal.crucible(fluid.of(moltenFluid, 288), Item.of('tconstruct:repair_kit', {Materialtconstruct:${nameUnify}}))
And every "tconstruct:repair_kit" gives the same molten fluid.

commented

Confirmed.
If there is a recipe that uses an item with no NBT, that one is used - regardless of if more recipes with NBT are loaded afterwards.
If there is a recipe that uses an item with NBT, it seems like a random recipe is chosen. (I've basically pulled my hair out trying to determine the trend of fluid selections)

My Java isn't good enough to find where in the Thermal source for the crucible that the item NBT isn't respected.
https://github.com/KingLemming/1.16/blob/main/ThermalExpansion/src/main/java/cofh/thermal/expansion/tileentity/machine/MachineCrucibleTile.java

Minecraft: 1.16.5
KubeJS: kubejs-forge-1605.3.19-build.180.jar
Architectury: architectury-1.24.35-forge.jar
Rhino: rhino-forge-1605.1.5-build.75.jar

  //No recipe without NBT
    //Output fluid is lava
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}'))
    event.recipes.thermal.crucible(Fluid.of('create:honey', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}'))

    //Output fluid is lava
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}'))
    event.recipes.thermal.crucible(Fluid.of('create:honey', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}'))

    //Output fluid is honey
    event.recipes.thermal.crucible(Fluid.of('create:honey', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 250), Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}'))
[INFO] server_scripts:Spiker985.js:26: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}')] -> []
[INFO] server_scripts:Spiker985.js:28: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}')] -> []
[INFO] server_scripts:Spiker985.js:27: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}')] -> []

[INFO] server_scripts:Spiker985.js:26: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}')] -> []
[INFO] server_scripts:Spiker985.js:28: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}')] -> []
[INFO] server_scripts:Spiker985.js:27: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}')] -> []

[INFO] server_scripts:Spiker985.js:26: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:cobalt"}')] -> []
[INFO] server_scripts:Spiker985.js:27: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:bloodbone"}')] -> []
[INFO] server_scripts:Spiker985.js:28: + thermal:crucible: [Item.of('tconstruct:repair_kit', '{Material:"tconstruct:wood"}')] -> []
  //Recipe without NBT
    //Output fluid is lava
    event.recipes.thermal.crucible(Fluid.of('create:honey', 250), Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"No\"}'}}"))
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 250), Item.of('minecraft:arrow'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 250), Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"Na\"}'}}"))

    //Output fluid is honey
    event.recipes.thermal.crucible(Fluid.of('minecraft:lava', 250), Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"Na\"}'}}"))
    event.recipes.thermal.crucible(Fluid.of('create:honey', 250), Item.of('minecraft:arrow'))
    event.recipes.thermal.crucible(Fluid.of('minecraft:water', 250), Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"No\"}'}}"))
[INFO] server_scripts:Spiker985.js:31: + thermal:crucible: [Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"No\"}'}}")] -> []
[INFO] server_scripts:Spiker985.js:32: + thermal:crucible: ['minecraft:arrow'] -> []
[INFO] server_scripts:Spiker985.js:33: + thermal:crucible: [Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"Na\"}'}}")] -> []

[INFO] server_scripts:Spiker985.js:31: + thermal:crucible: [Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"Na\"}'}}")] -> []
[INFO] server_scripts:Spiker985.js:32: + thermal:crucible: ['minecraft:arrow'] -> []
[INFO] server_scripts:Spiker985.js:33: + thermal:crucible: [Item.of('minecraft:arrow', "{display:{Name:'{\"text\":\"No\"}'}}")] -> []
commented

Actually, according to #221 this is intended by Thermal