#What's worng with my code?

48 messages · Page 1 of 1 (latest)

drowsy sail
#
        { input: [Item.of('create_crush_everything:diamond_shard'), 2] },
        [
        'AAA',
        'AAA',
        'AAA'
        ],
        {A: 'minecraft:dirt'}
    )
gritty kestrelBOT
#

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

hardy peak
#

i dont even know what youre trying to do here

#

are you trying to add a shaped recipe or to replace an input in recipes?!

#

you cant do both lol

drowsy sail
#

sorry i had no internet

#

i was trying to replace a input recipe using shaped recipe or smth like this

#

my code is different now, but the result isn't what i want beside its working

#

but what i really want is to replace the input of a specific recipe

#

i tried to remove it so i could add a new one

        [{
            type: 'crafting_shape'
        },
        { input: Item.of("create_crush_everything:diamond_shard", 2) },
        { output: Item.of("minecraft:diamond") }
        ])

But it removed all recipes with input: diamond_shard and all recipes with output:diamond

#

so now its impossible to craft anything with diamond shard or to craft diamond by any way (can't turn diamond blocks into diamond)

#

and thats not what i want

#

i only want to remove the recipe where 2 diamond_shards become a diamond

#

or at least replace it for 9 diamonds_shards

hardy peak
#

im even more confused than before

#

xD

#

so going off of the premise of you wanting to replace the input of a specific recipe:

e.replaceInput({ id: 'recipe ID here' }, 'item to remove', 'item to replace it with')

for instance

e.replaceInput({ id: 'minecraft:diamond_chestplate' }, 'diamond', 'dirt')
hardy peak
reef pecanBOT
#

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

drowsy sail
drowsy sail
#

soi want it

#

to become

#

(ye i did it on paint lol)

calm spindle
#

so you need to remove the first one and add new recipe

#

10/10 paint skills

#

I actually couldnt tell

drowsy sail
#

xD if you see the diamond shards are unaligned

calm spindle
#

ye its visible if I know about it

drowsy sail
#

so

#

is that a shape or a shapeless craft?

calm spindle
#

it doesnt matter in this case

drowsy sail
#

oh ok

calm spindle
#

because there is only one shape you can make with 9 of the same item

drowsy sail
#

i always had this doubt since i started datapacking

#

theres something else i need to ask about this subject thats the why i didn't close the ticket yet

#

but

#

i forget what was it and im pretty sure i'll remember when i make this recipe work

hardy peak
#
e.remove({ id: 'recipe ID' })
e.shapeless('diamond', '9x create_crush_everything:diamond_shard')
#

or

#

if you wanna simplify it further

#
e.shapeless('diamond', '9x create_crush_everything:diamond_shard').id('recipe ID') // ID of the recipe you're trying to replace
drowsy sail
#

thank guys

#

i really forget the other thing so

#

tysm