#im trying to make a recipe but i keep getting errors and it says that "event" is not identified.

32 messages · Page 1 of 1 (latest)

lapis otter
#

In the code the word event has a cross through it.

stoic owlBOT
#

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

bronze mica
#

you need to put recipes inside the recipe event

#
onEvent('recipes', event => {
  //recipe related code here

})
#

the event => { defines event as the recipe event

lapis otter
#

that got rid of the event issue, but now it says "java.lang.IllegalStateExeption: Can't modify the empty stack."
I can send the code if its needed

fleet jolt
#

please do

lapis otter
#

onEvent('recipes', event => {
event.custom({
"type": "create:filling",
"ingredients": [
{
"item": "create:blaze_cake"
},
{
"fluid": "tconstruct:block/fluid/molten/blaze",
"nbt": {},
"amount": 250
}
],
"results": [
{
"item": "blazeblood_dipped_blazecake"
}
]
})
})

fleet jolt
#

??codeblock

stuck lanternBOT
# fleet jolt ??codeblock

You can write your code in a codeblock by typing it between the codeblock delimiters:

```js :arrow_left:

onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

As an example, :arrow_up: will look like this:

onEvent('recipes', e => {
  e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
lapis otter
#

do i put that in the code?

fleet jolt
#

in discord

lapis otter
#

onEvent('recipes', event => {
"type": "create:filling",
"ingredients": [
{
"item": "create:blaze_cake"
},
{
"fluid": "tconstruct:block/fluid/molten/blaze",
"nbt": {},
"amount": 250
}
],
"results": [
{
"item": "blazeblood_dipped_blazecake"
}
]
})

Like this?

bronze mica
#

no

#

look at the parts before the gian arrows

#

put that around your script

lapis otter
#

onEvent('recipes', event => {
event.custom({
"type": "create:filling",
"ingredients": [
{
"item": "create:blaze_cake"
},
{
"fluid": "tconstruct:block/fluid/molten/blaze",
"nbt": {},
"amount": 250
}
],
"results": [
{
"item": "blazeblood_dipped_blazecake"
}
]
})
})

#

oops

#

wait

#
onEvent('recipes', event => {
event.custom({
    "type": "create:filling",
    "ingredients": [
      {
        "item": "create:blaze_cake"
      },
      {
        "fluid": "tconstruct:block/fluid/molten/blaze",
        "nbt": {},
        "amount": 250
      }
    ],
    "results": [
      {
        "item": "blazeblood_dipped_blazecake"
      }
    ]
  })
})
#

like that?

bronze mica
#

yes

#

it just makes it a lot more readable

#

your output item does exist

#

also you probably want to remove the nbt line from the fluid

lapis otter
#

my output item is another item i made in the startup script

bronze mica
#

if it is a custom item you need to include kubejs as the namespace, like kubejs:my_custom_item

lapis otter
#
        "item": "kubejs:blazeblood_dipped_blazecake"
#

that still gives me the same error in game

azure lagoon
#

did you try it with a vanilla item that already exists to make sure the result item is not the problem?

also, does that fluid really exist / is the path correct?
https://github.com/SlimeKnights/TinkersConstruct/blob/99af4c56431f79f5679f0ba82e084fb875ae1a24/src/main/resources/assets/tconstruct/blockstates/blazing_blood_fluid.json#L5

looks like you are referencing the texture?

GitHub

Tinker a little, build a little, tinker a little more... - TinkersConstruct/src/main/resources/assets/tconstruct/blockstates/blazing_blood_fluid.json at 99af4c56431f79f5679f0ba82e084fb875ae1a24 · S...

lapis otter
#

Ok i got it turns out it was the blazing blood i did have it as the texture thank you so much