#How to make the datagen generate the correct achievement recipes

13 messages · Page 1 of 1 (latest)

floral salmon
#

I've noticed how when using the FabricRecipeProvider.offerSmelting, offerBlasting and so on the recipes themselves work but the achievement that grants the recipe is generated with the "minecraft:" namespace instead, trying to grant the mod recipes with the minecraft: namespace instead of the mod_id.
How can i make it so they generate correctly?

#

This is the generated achievement:

{
  "parent": "minecraft:recipes/root",
  "criteria": {
    "has_deepslate_ruby_ore": {
      "conditions": {
        "items": [
          {
            "items": "thnote:deepslate_ruby_ore"
          }
        ]
      },
      "trigger": "minecraft:inventory_changed"
    },
    "has_the_recipe": {
      "conditions": {
        "recipe": "minecraft:ruby_from_blasting_deepslate_ruby_ore"
      },
      "trigger": "minecraft:recipe_unlocked"
    }
  },
  "requirements": [
    [
      "has_the_recipe",
      "has_deepslate_ruby_ore"
    ]
  ],
  "rewards": {
    "recipes": [
      "minecraft:ruby_from_blasting_deepslate_ruby_ore"
    ]
  }
}
#

And this is the expected generation:

{
  "parent": "minecraft:recipes/root",
  "criteria": {
    "has_deepslate_ruby_ore": {
      "conditions": {
        "items": [
          {
            "items": "thnote:deepslate_ruby_ore"
          }
        ]
      },
      "trigger": "minecraft:inventory_changed"
    },
    "has_the_recipe": {
      "conditions": {
        "recipe": "thnote:ruby_from_blasting_deepslate_ruby_ore"
      },
      "trigger": "minecraft:recipe_unlocked"
    }
  },
  "requirements": [
    [
      "has_the_recipe",
      "has_deepslate_ruby_ore"
    ]
  ],
  "rewards": {
    "recipes": [
      "thnote:ruby_from_blasting_deepslate_ruby_ore"
    ]
  }
}
#

Please ping me so i get notification in case someone responds

woeful wind
#

I have a same problem

floral salmon
#

like this

#

.offerTo(exporter, Thnote.MOD_ID + ":" + getItemPath(ModItems.RUBY) + "_from_condensed_ruby");

#

the path is the name of the file it will generate

#

this makes it so the offerBlasting, offerSmelting and so on dont work correctly, personally i made a new class to add the behaviour so it works correctly

rapid garden
#

@floral salmon Would you mind sharing your solution to this issue? I'm currently wrestling with the same problem. I have everything that can generate my mod id's namespace, but not offerBlasting, offerSmelting, etc.

floral salmon
#

change the package too