const ingots = ['copper', 'diamond', 'electrum', 'gold']
const bIngredients = ['thermal:copper_plate', 'kubejs:diamond_plate', 'thermal:electrum_plate', 'thermal:gold_plate']
ingots.forEach((ingot, index) => {
const rod = `${ingot}_rod`
const bIngredient = bIngredients[index]
ServerEvents.recipes((event) => {
event.shaped(`kubejs:${rod}`, [
'AB ',
' ',
' '
], {
A: 'kubejs:saw',
B: bIngredient
}).damageIngredient('kubejs:saw')
})
})
#loooooooooooooooooooooopppppppsssssssssss
99 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
please help i really suck at this
😮
You can also delete all the empty lines and columns in the pattern
damn
Just leave it as ['AB']
it feels wrong for me 😩

it doesnt work
Wdym 
Oh wait it's the list

You're redefining the list somewhere
Which you can't so if you use const, that's what const is for
Somewhere else in your script
Your error says the thing exists already
do you have another script file using the exact same variable?
ARE THE VARIABLES PUBLIC ?
WAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
All files are loaded into a global scope
global varibales are accessible anywhere in a project
well within the scope of whichever of the 3 folders you're in
ty
When you see 10 files, kjs only sees 1 file
Pic is not loading for me
I personally prefer maps to dual lists, but that's just me
Same uwu
speaking chinese
Sort of, based on the documentation it separates the "1 file" in segments based on loading. Startup at launch, server at world launch (I think) and client is just localization etc.
i made a cool macro for /kubejs hand
*Numpad0::
SendInput, {t} ; Presses the T key to open the chat
Sleep 100
SendInput, /kjs_hand{Enter} ; Sends the command /kjs_hand and presses Enter
return`
correct Nillie
thanks chatgpt
Just think of KJS as 1 big container and anything you define is defined in any script you make.
This is autohotkey lol
there is a global variable though that crosses the 3 namespaces
Wait why do you have a macro. For. It
should read the changelogs, it's coming in the future
Just make a dev item, or make the stick a right click function to run the reload command
will have a keybind that opens a gui that gives you all the info on an object
i want to know the item in my hand
not reload
Ah misread
You can still do that with offhand stick lol

Main hand = reload, offhand = item in hand :D
Thats what I would do

Cheeky like that

i don't call myself a dev
i can only understand code that is written
but can't write it myself
I dint either, but having a dev item sounds cool
Most developers don't make their own code, they just take public code and make it work for their own problems. That's like 70% of development.
Prime example: Stack Overflow
I honestly recommend against using the addon mods and using the JSON method via the recipe builder from Thermal. Its more direct IMO and doesn't seem to fail.
Im pretty sure it only takes 2 parameters
With a list of 2 inputs as the second param
I highly recommend against that.
against using JSON ?
Lol
I meant the JS JSON methods not actually json.
event.custom({
type: 'create:splashing',
ingredients: [
{
'item': `kubejs:crushed_raw_${entry.material}`
}
],
results: [
{
'count': 9,
'item': `kubejs:nugget_${entry.material}`
}
]
}).id(`kubejs:create/splashing/crushed_raw_${entry.material}`)
Why do you recommend against it? It seems to work flawlessly for me 🤔
event.custom({
type: 'create:splashing',
ingredients: [
{ 'item': `kubejs:crushed_raw_${entry.material}` }
],
results: [
{ 'item': `kubejs:nugget_${entry.material}`, 'count': 9 }
]
}).id(`kubejs:create/splashing/crushed_raw_${entry.material}`)
You don't have to follow the JSON curly bracket split for each line btw and can make it more readable like this
I just use a code formatter in VSC keeps all my code formatted in the same way.






