#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)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you need to put recipes inside the recipe event
onEvent('recipes', event => {
//recipe related code here
})
the event => { defines event as the recipe event
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
please do
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"
}
]
})
})
??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)
})
do i put that in the code?
in discord
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?
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?
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
my output item is another item i made in the startup script
if it is a custom item you need to include kubejs as the namespace, like kubejs:my_custom_item
"item": "kubejs:blazeblood_dipped_blazecake"
that still gives me the same error in game
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?
could try one of these
Ok i got it turns out it was the blazing blood i did have it as the texture thank you so much