#Do I need the Item.of() for the .withchance() output?
76 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
ok thx
No probs
did I write the example rite?
no
thought so
You did not. Replace the parenthesis with item id's in them with brackets, and put brackets around your output item
event.recipes.createMixing([Item.of('poppy').withchance(2)], ['poppy', 'bone_meal']).id('example')
I think
ohh makes sense
also, withChance takes a value between 0 and 1
^
??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)
})
Sorry I just got up, too much work 😛
I would've written the code, but I'm on my phone, it would be a pain for me
Fair
by 0 and 1, is it the chance or how many items are outputted?
the chance
^
event.recipes.createMixing([Item.of('poppy').withchance(0.02)], ['poppy', 'bone_meal']).id('example')```
How do I write it so only one poppy can output and have a chance for three?
Just like my code I posted, but with the chance being 0.03
Oh
Sorry I read wrong
again, just got up
is ok lol
Sorry you had to write that
it's okay :D
do I need the []
Yes
Yes
ok
The create addon is extremely picky about it
ikr
event.recipes.createMixing(['poppy', Item.of('poppy', 2).withchance(0.5)], ['poppy'], ['bone_meal]').id('example')
that should be correct?
?? 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)
})
that's wrong
yep, Forgot abt that
And no, the inputs need to be in one bracket set
^
['poppy', 'bone_meal']
you forgot one '
Oops, must've hit it accidentally
event.recipes.createMixing(['poppy', Item.of('poppy', 2).withchance(0.5)], ['poppy', 'bone_meal]').id('example')```
?
also you have a random ] in the string
?? 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)
})

Lol
otherwise, seems okay
event.recipes.createMixing(['poppy', Item.of('poppy', 2).withchance(0.5)], ['poppy', 'bone_meal']).id('example')```
yep
Yes perfect
yay thnks that would of taken for ever for me to figure out lol
You're welcome
np :D
Have a nice day you two
thank you, have an amazing day aswell :D