跳到正文

Random Recipes

作者:Annieif

Seed-based crafting recipe randomizer — every world, a new puzzle.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Random Recipes

Deterministic crafting recipe shuffler for Fabric — every world, a new puzzle.

Enter a world, and all crafting table recipes are shuffled using the world seed as the random source. Same seed = same recipes forever. Different seeds = completely different recipes. Perfect for SMP — every player in the same world sees identical shuffled recipes.

Features

  • Seed- deterministic shuffling — a single world seed controls all randomization, using Java Random for reproducibility
  • Three-layer recipe transformation:
  1. Fisher-Yates shuffle on ingredient positions (non-empty slots only)
  2. Ingredient addition, removal (shapeless only), or replacement — 1 to 2 changes per recipe
  3. Automatic duplicate detection & conflict resolution after shuffling
  • Global item pool — single-material recipes (shears, iron nuggets, pressure plates, etc.) pull candidates from every item that appears across all crafting recipes, preventing “replace iron with iron” no-ops
  • Three protected defaults — wooden, stone, and iron pickaxes are always kept unchanged so the game remains playable
  • Config-file extension — config/random-recipes.json lets you protect additional items by ID or specific recipe IDs
  • Cross-mod compatible — automatically processes crafting recipes registered by other mods
  • /reload friendly — edit the config and run /reload; changes apply instantly, no restart needed

How it works

| Step | What happens |
|——|————-|
| 1. Scan | All recipes of type RecipeType.CRAFTING are collected at server startup |
| 2. Filter | Protected items (three pickaxes + config entries) are skipped |
| 3. Build pool | Every item appearing in any crafting recipe is collected into a global pool |
| 4. Shuffle | Each non-protected recipe gets its ingredients shuffled, then modified 1-2 times |
| 5. Deduplicate | The final list is checked for identical (output + ingredient set) pairs; conflicts are auto-resolved |

Installation

  1. Install Fabric Loader ≥ 0.15
  2. Install Fabric API
  3. Place the jar in .minecraft/mods/
  4. Launch Minecraft 1.20.1

Configuration

Generated automatically on first run at config/random-recipes.json:

{
  "protected_output_items": [
    "minecraft:wooden_pickaxe",
    "minecraft:stone_pickaxe",
    "minecraft:iron_pickaxe"
  ],
  "protected_recipe_ids": []
}

| Field | Purpose | Example |
|——-|———|———|
| protected_output_items | Protect all recipes that output a specific item | "minecraft:diamond_sword" |
| protected_recipe_ids | Protect a specific recipe by its namespace ID | "mymod:special_item" |

Build from source

git clone https://github.com/Annieif/random-recipes.git
cd random-recipes
./gradlew build

Artifacts are in build/libs/random-recipes-*.jar.

Screenshots

Shuffled iron axe recipe
Protected iron pickaxe (unchanged)
Shuffled oak slab recipe

Links

License

MIT

常见问题

Random Recipes 支持哪些 Minecraft 版本?

Random Recipes 支持 Minecraft Java 版 1.20.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Random Recipes 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分