#Forge 1.19.2 - Adding NBT item to a recipe w/ event.custom

22 messages · Page 1 of 1 (latest)

simple veldt
#
  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {"item": "industrialforegoing:plastic",},
        {
            "item": {
                "type": "forge:nbt",
                "item": "productivebees:configurable_honeycomb",
                "nbt": {
                    "EntityTag": {
                        "type": "productivebees:zinc"
                    }
                }
            }
        },
        {"item": "emendatusenigmatica:desh_dust",},
        {"item": "emendatusenigmatica:apatite_dust",}],
          "pressure": 2.0, 
          "results": [{"item": "pneumaticcraft:plastic"}]
  })

using event.custom I've added a few recipes to PneumaticCraft Pressure Chamber. I wanted to add another recipe, but it utilizes NBT.

I was looking @ the ProductiveBees recipes, which is how I found

        {
            "item": {
                "type": "forge:nbt",
                "item": "productivebees:configurable_honeycomb",
                "nbt": {
                    "EntityTag": {
                        "type": "productivebees:zinc"
                    }
                }
            }
        },

This is yielding an error though, so the recipe isn't being generated:

[12:03:30] [WARN ] Error creating recipe pneumaticcraft:kjs_t9evggyg17b9xnp7zmos8xrv[pneumaticcraft:pressure_chamber]: {"type":"pneumaticcraft:pressure_chamber","inputs":[{"item":"industrialforegoing:plastic"},{"item":{"type":"forge:nbt","item":"productivebees:configurable_honeycomb","nbt":{"EntityTag":{"type":"productivebees:zinc"}}}},{"item":"emendatusenigmatica:desh_dust"},{"item":"emendatusenigmatica:apatite_dust"}],"pressure":2.0,"results":[{"item":"pneumaticcraft:plastic"}]}: com.google.gson.JsonSyntaxException: Expected item to be a string, was an object ({"ty...}}})

plucky hazelBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

orchid gyro
#

try replacing:

        {
            "item": {
                "type": "forge:nbt",
                "item": "productivebees:configurable_honeycomb",
                "nbt": {
                    "EntityTag": {
                        "type": "productivebees:zinc"
                    }
                }
            }
        },

with

        {
            "item": "productivebees:configurable_honeycomb",
            "nbt": {
                "EntityTag": {
                    "type": "productivebees:zinc"
                }
            }
        },
simple veldt
#

Hmm,

That half worked.

It's now adding a Honeycomb item in there, but it's blank.

Think I got the code right

  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {"item": "industrialforegoing:plastic",},
        {
            "item": "productivebees:configurable_honeycomb",
            "nbt": {
                "EntityTag": {
                    "type": "productivebees:zinc"
                }
            }
        },
        {"item": "emendatusenigmatica:desh_dust",},
        {"item": "emendatusenigmatica:apatite_dust",}],
          "pressure": 2.0, 
          "results": [{"item": "pneumaticcraft:plastic"}]
  })
#

pretty sure we got the comb tagged right also? as in "productivebees:zinc" and not "zinc_comb" or anything

simple veldt
#

does the 3 on that line ther ematter, at the end of configurable_honeycomb?

orchid gyro
#

guessing you had 3 in your hand

#

that's count

simple veldt
#

Oh, hah, yeah there is 3 there

orchid gyro
#

I mean you can try replacing that whole entry with

Item.of('productivebees:configurable_honeycomb', '{EntityTag:{type:"productivebees:zinc"}}').toJson()
#

so

  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {"item": "industrialforegoing:plastic",},
        Item.of('productivebees:configurable_honeycomb', '{EntityTag:{type:"productivebees:zinc"}}').toJson(),
        {"item": "emendatusenigmatica:desh_dust",},
        {"item": "emendatusenigmatica:apatite_dust",}],
          "pressure": 2.0, 
          "results": [{"item": "pneumaticcraft:plastic"}]
  })
simple veldt
#

same thing.. hmm

#
  event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {"item": "industrialforegoing:plastic",},
        Item.of('productivebees:configurable_honeycomb', '{EntityTag:{type:"productivebees:zinc"}}').toJson(),
        {"item": "emendatusenigmatica:desh_dust",},
        {"item": "emendatusenigmatica:apatite_dust",}],
          "pressure": 2.0, 
          "results": [{"item": "pneumaticcraft:plastic"}]
  })
#

actually, let me triple check I saved, then reload again..

orchid gyro
#

then pnc either requires a specifc format for nbt, or doesn't support nbt there

simple veldt
#

Hmm, I'll check over at the PNC Discord for that. Just looked through all of the Pressure Chamber recipes and none of them utilize NBT in there

simple veldt
#

@orchid gyro

Looks like over on the PNC Discord for 1.18 someone asked a question, and shared their script:

// Spawner Core: Blizz Core --(vacuum chambered)--> Blitz Core
event.custom({
    "type": "pneumaticcraft:pressure_chamber",
    "inputs": [
        {
        "type": "forge:nbt",
        "item": "pneumaticcraft:spawner_core",
        "nbt": "{\"pneumaticcraft:SpawnerCoreStats\":{\"thermal:blizz\":100}}"
        },
        {
        "type": "pneumaticcraft:stacked_item",
        "item": "minecraft:bucket",
        "count": 8
        }
      ],
      "pressure": -0.85,
      "results": [
        {
        "item": "pneumaticcraft:spawner_core",
        "nbt": "{\"pneumaticcraft:SpawnerCoreStats\":{\"thermal:blitz\":10}}"
        },
        {
        "type": "pneumaticcraft:stacked_item",
        "item": "minecraft:water_bucket",
        "count": 8
        }
      ]
    })

This was 1.18, but I was able to repurpose that:

    event.custom({
    "type": "pneumaticcraft:pressure_chamber", 
      "inputs": [
        {"item": "industrialforegoing:plastic",},
        {
        "type": "forge:nbt",
        "item": "productivebees:configurable_honeycomb",
        "nbt": {
                "EntityTag": {
                    "type": "productivebees:zinc"
                             }
               }
        },
        {"item": "emendatusenigmatica:desh_dust",},
        {"item": "emendatusenigmatica:apatite_dust",}],
          "pressure": 2.0, 
          "results": [{"item": "pneumaticcraft:plastic"}]
  })
orchid gyro
#

ah, try movie it up one, lose the first item.... yeah I was just getting there lol

simple veldt
#

😄

orchid gyro
#

funny timing

simple veldt
#

Ty as always though!

#

Will go ahead and close this one out.

Until the next question... ^^