#Change recipe help (1.19.2)

25 messages · Page 1 of 1 (latest)

half egret
#

For my modpack, I need help figuring out how to remove all recipes involving the use of ores (iron, copper, gold, etc) so that they can't output their ore. I would also prefer to change the create recipe so that you require a millstone to go from iron ore to iron nuggets by 5 with a 5/8 chance, with a 5% chance of crushed iron ore. How do I go about this?
I have done the following (trying to do both legacy and current coding), but it doesn't work:

event.remove([{ type: 'minecraft:smelting', output: 'minecraft:iron_ingot' }, { type: 'minecraft:blasting', output: 'minecraft:iron_ingot' }])
event.remove([{ type: 'minecraft:smelting', output: 'minecraft:copper_ingot' }, { type: 'minecraft:blasting', output: 'minecraft:copper_ingot' }])
event.remove([{ type: 'minecraft:smelting', output: 'minecraft:gold_ingot' }, { type: 'minecraft:blasting', output: 'minecraft:gold_ingot' }])
onEvent('recipes', event => 
{
    //Remove by recipe ID
    [
        'minecraft:iron_ingot_from_smelting_iron_ore',
        'minecraft:iron_ingot_from_smelting_deepslate_iron_ore',
        'minecraft:copper_ingot_from_smelting_copper_ore',
        'minecraft:copper_ingot_from_smelting_deepslate_copper_ore',
        'minecraft:gold_ingot_from_smelting_gold_ore',
        'minecraft:gold_ingot_from_smelting_nether_gold_ore',
        'minecraft:gold_ingot_from_smelting_deepslate_gold_ore'

    ].forEach((recipeID) => event.remove({id: recipeID}));

})
oblique vectorBOT
#

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

half egret
#

I'm new to all of this, so any tips are greatly appreciated!

scenic whale
# half egret For my modpack, I need help figuring out how to remove all recipes involving the...
  1. onEvent('recipes', event => only work on 1.18 , 1.19 require one of this events -> for recipes you need ServerEvents.recipes(event =>

  2. all scripts should be inside event to work -> you need to write inside {} of ServerEvents.recipes(event =>{} all your scripts
    example ```js
    ServerEvents.recipes(event =>{

event.remove({ id: 'minecraft:glowstone' })

})


3. also i suggest you to use remove by id due remove by filters should not work some times
half egret
#

Thanks, it worked! Now with changing recipes, how do I do it with this one:

#

I've mentioned before how I'd want to approach it

scenic whale
#

you just need to copy all json file and paste all content inside () of event.custom()

#

example :

event.custom({
  "type": "create:crushing",
  "ingredients": [
    {
      "tag": "forge:ores/aluminum"
    }
  ],
  "results": [
    {
      "item": "create:crushed_raw_aluminum"
    },
    {
      "item": "create:crushed_raw_aluminum",
      "chance": 0.75
    },
    {
      "item": "create:experience_nugget",
      "chance": 0.75
    }
  ],
  "processingTime": 400,
  "conditions": [
    {
      "value": {
        "tag": "forge:ores/aluminum",
        "type": "forge:tag_empty"
      },
      "type": "forge:not"
    }
  ]
})
half egret
#

I only see this

scenic whale
scenic whale
half egret
#

Ah, okay

#

What app do I use to open the create.jar file? Visual Studio Code won't accept it

scenic whale
half egret
#

Yep, and I've found the file

#

Thanks!

half egret
#

Actually, how can I create a new recipe for the millstone?

#

Since there's only the crushing one for iron ore

scenic whale
half egret
#

Alright, when I'm able to I'll test these out and say how it went

half egret
#

Yeah, I've updated those files too, thanks!