#How would I create a reversible stonecutter recipe

7 messages · Page 1 of 1 (latest)

left silo
#

I want to create a way to make variants of one block and convert them between the variants. When I use this code, it just creates the recipe for the first item in the array (I also checked this with the console logging). I'm not sure what I did wrong, but I'm not the best at JS so it might just be that

pallid oreBOT
#

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

jaunty stumpBOT
#

Please send your server.txt log file.
You can find it here: minecraft/logs/kubejs/server.txt

left silo
jaunty stumpBOT
#

Paste version of server.txt from @left silo

violet radish
#

not sure what exactly is wrong but I would advise you to use for in or forEach loops instead of indexed for loops when you want to iterate over something like an array:

for (output in blocklist) {
  for (input in blocklist) {
    e.stonecutting(output, input)
  }
}``` or:
```JS
blocklist.forEach((output) => {
  blocklist.forEach((input) => {
    e.stonecutting(output, input)
  }
}```
left silo
#

Thanks, it worked really well. I just added an 'if input != output' and it made it so you couldn't turn one thing into itself and it works well.