#Hi i try to modif to recipe and i dont understand for not find skrit can you help ty for you help
42 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
you have a missing comma after nether_star
If you're working with KubeJS scripts, config files, or similar things, we generally recommend using an actual IDE rather than just Notepad++ and its various siblings.
In a lot of cases, it can help you find errors in your code faster and also gives you neat features like syntax highlighting, automatic formatting, etc!
We recommend Visual Studio Code, since it's lightweight(-ish) and works very well with JavaScript files out-of-the-box.
again
youre missing the event itself
You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
If you want to learn how to add recipes to any mod, click the Custom button.
i dont understand
thats why i linked the wiki
in that case
Send your code here instead of a screenshot
It makes it easier to diagnose your code and help you fix it or make the required changes/additions.
i use first time ServerEvents.recipes(event => { and i add
Item.of('structurecompass:structure_compass', 1), // arg 1: output
[
'ADB',
' C ', // arg 2: the shape (array of strings)
'B A'
],
{
A: 'minecraft:diamond_block',
B: 'minecraft:iron_block', //arg 3: the mapping object
C: 'minecraft:nether_star',
D: 'minecraft:compass',
}
)?
ServerEvents.recipes(event => {
event.shaped('structurecompass:structure_compass', [
'ADB',
' C ',
'B A'
], {
A: 'minecraft:diamond_block',
B: 'minecraft:iron_block',
C: 'minecraft:nether_star',
D: 'minecraft:compass',
})
})
i have more problem i have two recipe here
where
use event.remove() to remove it then
To find a recipe's ID, turn on advanced tooltips (F3 + H) then hover over the RECIPE OUTPUT in JEI, or the exclamation mark in REI.
You can then use this in any recipe filter:
{id: 'recipe ID here'}
You can use this, for example, to remove specific recipes:
event.remove({id: 'recipe ID here'})
i think remove item maybe remove new recipe no ?
wha? 
two recipe
Fortunately that is usually an easy fix
Your script probably looks like
ServerEvents.recipes(e => {
//should be
ServerEvents.recipes(event => {
The E or Event should always match with event.shaped or e.shaped, ect
So replace event.remove with e.remove or move it into the serverEvent.recipe(e
ServerEvents.recipes(event => {
event.remove({ output: 'structurecompass:structure_compass'' })
event.shaped('structurecompass:structure_compass', [
'ADB',
' C ',
'B A'
], {
A: 'minecraft:diamond_block',
B: 'minecraft:iron_block',
C: 'minecraft:nether_star',
D: 'minecraft:compass',
})
})
That should 1 remove all recipes for the compass then 2 make a new one after that
Scripts run from top to bottom so you always put remove at the top then your add after to remove original recipes then add the new ones
If I had to guess you had event.remove on the outside of the recipe event it needs to be inside
i resolve easy probleme just code moding remore base recipe and i add new recipe
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You should generally create a new post for unrelated issues.
speek english not whatever the hell this is plz we cant help if we cant understand anything