#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)

honest fossil
main lindenBOT
#

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

honest fossil
rain hinge
#

you have a missing comma after nether_star

forest shellBOT
#

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.

honest fossil
rain hinge
#

youre missing the event itself

forest shellBOT
#

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.

honest fossil
rain hinge
#

thats why i linked the wiki

honest fossil
#

i use the wiki

#

just i dont understand

rain hinge
#

in that case

forest shellBOT
#

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.

honest fossil
#

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',
}
)?

rain hinge
#
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',
    })
})
honest fossil
#

i have more problem i have two recipe here

rain hinge
#

where

honest fossil
rain hinge
#

use event.remove() to remove it then

forest shellBOT
#

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'})

honest fossil
#

i think remove item maybe remove new recipe no ?

rain hinge
#

wha? hmmm

honest fossil
#

two recipe

honest fossil
#

new prob

neat coral
#

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

neat coral
#

If I had to guess you had event.remove on the outside of the recipe event it needs to be inside

honest fossil
#

i resolve easy probleme just code moding remore base recipe and i add new recipe

neat coral
#

So it’s fixed?

#

If so

#

??closeticket

forest shellBOT
# neat coral ??closeticket

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.

neat coral