drafts:resourceconditions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| drafts:resourceconditions [2026/03/04 03:23] – Add custom condition infinitychances | drafts:resourceconditions [2026/03/20 17:27] (current) – changed example again to not require build script changes infinitychances | ||
|---|---|---|---|
| Line 215: | Line 215: | ||
| This section will assume you have already set up a basic datagen setup. It will use recipes as an example. | This section will assume you have already set up a basic datagen setup. It will use recipes as an example. | ||
| - | We will create a custom shaped | + | We will create a recipe that creates |
| - | + | ||
| - | First, we must use modLocalRuntime and modCompileOnly on any version of Farmer' | + | |
| Next, we can go into our recipe provider and begin. | Next, we can go into our recipe provider and begin. | ||
| Line 229: | Line 227: | ||
| @Override | @Override | ||
| public void buildRecipes() { | public void buildRecipes() { | ||
| - | shaped(RecipeCategory.FOOD, Items.EGG) | + | shaped(RecipeCategory.MISC, Items.MINECART) |
| - | .pattern(" | + | .pattern(" |
| - | .pattern(" | + | .pattern(" |
| - | .define(' | + | .define(' |
| - | .define(' | + | .unlockedBy(getHasName(Items.COPPER_INGOT), has(Items.COPPER_INGOT)) |
| - | .unlockedBy(getHasName(ModItems.FRIED_EGG | + | .save(withConditions(output, |
| - | .save(withConditions(output, | + | |
| }; | }; | ||
| } | } | ||
| Line 246: | Line 243: | ||
| " | " | ||
| { | { | ||
| - | " | + | " |
| - | "values": [ | + | "features": [ |
| - | "farmersdelight" | + | "minecraft: |
| - | ] | + | ] |
| } | } | ||
| ], | ], | ||
| " | " | ||
| - | " | + | " |
| " | " | ||
| - | "b": "farmersdelight:fried_egg", | + | "c": "minecraft:copper_ingot", |
| - | " | + | |
| }, | }, | ||
| " | " | ||
| - | "b", | + | "c c", |
| - | "w" | + | "ccc" |
| ], | ], | ||
| " | " | ||
| " | " | ||
| - | " | + | " |
| } | } | ||
| } | } | ||
drafts/resourceconditions.1772594617.txt.gz · Last modified: 2026/03/04 03:23 by infinitychances