PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

KubeJS Explosion Crafting

CalebDepatie opened this issue ยท 1 comments

commented

Describe the bug

I'm attempting to add custom explosion crafting recipes via KubesJS. I've been able to add recipes for a few other pneumaticcraft machines already, but attempting to add one for explosion crafting is unsuccessful and results in the following warning emitted:

Error parsing recipe pneumaticcraft:kjs_bhlt1lx21ag25lmhcpsrcmo5s[pneumaticcraft:explosion_crafting]: {"type":"pneumaticcraft:explosion_crafting","input":{"tag":"forge:ingots/iron"},"result":{"item":"pneumaticcraft:ingot_iron_compressed"},"loss_rate":20}: java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsJsonArray()" because the return value of "com.google.gson.JsonObject.get(String)" is null

How to reproduce the bug

I used the following in KubeJS. The JSON is directly from the docs.

evt.custom({
"type": "pneumaticcraft:explosion_crafting",
"input": {
	"tag": "forge:ingots/iron"
},
"result": {
	"item": "pneumaticcraft:ingot_iron_compressed"
},
"loss_rate": 20
})

Expected behavior

The recipe to viewable in JEI and functional

Additional details

No response

Which Minecraft version are you using?

1.20

Which version of PneumaticCraft: Repressurized are you using?

4.3.7-30

Crash log

No response

commented

Oops, there was an error in the docs, which I'll fix now - sorry. Anyway, it should be:

{
  "type": "pneumaticcraft:explosion_crafting",
  "input": {
    "tag": "forge:ingots/iron"
  },
  "loss_rate": 20,
  "results": [
    {
      "item": "pneumaticcraft:ingot_iron_compressed"
    }
  ]
}

Note results instead of result, and it's an array of outputs. So you can have multiple outputs if desired.