▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/CraftLock
CraftLock

CraftLock

A minigame type of mod that locks every crafting recipe after it has been made once

Оцените первым
142
0

CraftLock

One craft. One chance.

A Fabric mod that turns every recipe into a single-use opportunity. Once you make it, you can never make it again — for the entire lifetime of the world.

!Minecraft !Fabric !Java !License-blue?style=for-the-badge)


Overview

CraftLock is a hardcore-challenge mod built for content creators and self-imposed-challenge enjoyers. The premise is simple and brutal:

Every recipe in the game can only be crafted once. After that, it's gone forever.

The first time you craft oak planks, sticks, a furnace, a diamond pickaxe, an Eye of Ender — that recipe locks. The next time you put the same ingredients in a crafting table, the result slot stays empty. The mod plays a denial sound, shows you the actionbar message "Already crafted Oak Planks once", and the run continues with one fewer tool in your kit.

It covers crafting tables, the 2x2 inventory grid, furnaces, blast furnaces, smokers, campfires, smithing tables, stonecutters, and the brewing stand. Two recipes are exempt by default — Blaze Powder and Eye of Ender — because without them, you can't finish the game.


Features

Locking

  • Universal coverage — crafting table, inventory 2x2, furnace family, smithing, stonecutter, brewing stand
  • Recipe-level granularity — oak_planks from logs locks separately from oak_planks from stripped logs
  • Persistent across restarts — the lock list is stored in the world save and survives sessions
  • Exempt list — recipes you choose stay infinite (default: blaze_powder, ender_eye)

UX polish for streaming

  • Yellow chat broadcast on every first-time craft: Chompii has crafted: Iron Ingot
  • Bell ping plays for all players when a new recipe is locked
  • Actionbar warning + villager-no sound when a blocked craft is attempted
  • Tooltip badge — locked items display a red italic Locked line with attribution: by Chompii · day 7
  • Recipe-book overlay — locked recipes are highlighted with a red tint inside the recipe book
  • Animated title played on /craftlock start (light-blue italic CraftLock with subtitle, plus a calm amethyst chime)

Tooling

  • A full command suite for moderators / streamers (see below)
  • JSON config at config/craftlock.json for sound tuning, exempt list, and brand text
  • Translation support via assets/craftlock/lang/en_us.json
  • SLF4J logger under the craftlock namespace

Installation

Requirements

ComponentVersion
Minecraft1.21.11
Fabric Loader>= 0.19.2
Fabric API0.141.4+1.21.11
Java21

Steps

  1. Install Fabric Loader for Minecraft 1.21.11.
  2. Drop Fabric API into your mods/ folder.
  3. Drop the latest craftlock-1.0.jar (from the Releases page) alongside it.
  4. Launch the game. The mod will run as soon as you load a world — locking does not start until you invoke /craftlock start.

Commands

All commands require permission level gamemaster (level 2 in vanilla terms — automatically granted to the singleplayer host).

CommandDescription
/craftlock startBegin enforcing locks. Shows the CraftLock title to all players.
/craftlock stopPause enforcement without clearing the lock list. Resume with start.
/craftlock statusPrint run state, locked-recipe count, and exempt-recipe count.
/craftlock listList every locked recipe by ID.
/craftlock resetWipe the entire lock list. Does not affect the started flag.
/craftlock lock <recipe>Manually lock a recipe (useful for setting up challenges).
/craftlock unlock <recipe>Manually unlock a single recipe.

Example

> /craftlock start
[CraftLock started.]
[Title: CraftLock]
[Subtitle: Created by Chompii]

> /craftlock list
Locked recipes (3):
  - minecraft:oak_planks
  - minecraft:stick
  - minecraft:crafting_table

> /craftlock unlock minecraft:stick
Unlocked minecraft:stick

Configuration

On first launch the mod writes config/craftlock.json with the defaults below. Edit the file and restart the world to apply changes.

{
  "titleText": "CraftLock",
  "subtitleText": "Created by Chompii",
  "exemptRecipes": [
    "minecraft:blaze_powder",
    "minecraft:ender_eye"
  ],
  "craftPingVolume": 0.6,
  "craftPingPitch": 1.5,
  "startSoundVolume": 1.0,
  "startSoundPitch": 1.0,
  "blockedSoundVolume": 1.0,
  "blockedSoundPitch": 1.0
}
FieldTypeNotes
titleTextstringText shown when /craftlock start fires.
subtitleTextstringSubtitle paired with the title.
exemptRecipesstring[]Recipe IDs that can be crafted any number of times.
craftPingVolume / craftPingPitchfloatBell sound played on every first-time craft.
startSoundVolume / startSoundPitchfloatAmethyst chime played on /craftlock start.
blockedSoundVolume / blockedSoundPitchfloatVillager "no" played when a craft is blocked.

How it works

CraftLock is built around a per-world SavedData instance that stores:

  • A set of locked recipe IDs
  • A metadata map: {recipe_id -> {crafter, world_day}}
  • A started flag

Mixins attach to the appropriate vanilla menus and block entities:

ClassHookPurpose
CraftingMenuslotChangedCraftingGrid (TAIL)Clear the result slot + send a ClientboundContainerSetSlotPacket if the matched recipe is locked. Also caches the recipe so ResultSlot.onTake can still see it after vanilla's shift-click drain.
ResultSlotonTake (HEAD)Record the lock + broadcast.
AbstractFurnaceBlockEntitycanBurn (HEAD) + setRecipeUsed (HEAD)Block smelting if locked; record on completion.
CampfireBlockEntitygetCookableRecipe (RETURN) + placeFood (RETURN)Block placement if locked; record on placement.
SmithingMenucreateResult (TAIL) + onTake (HEAD)Clear result if locked; record on take.
StonecutterMenusetupResultSlot (TAIL) + onTake (HEAD)Same pattern.
PotionBrewingmix (RETURN)Return the unmixed input if the output would be a locked potion variant; lock on successful brew.
RecipeButtonrenderWidget (TAIL) — client onlyPaint a red overlay on locked recipes inside the recipe book.

State syncs to all connected clients via a craftlock:lock_list custom payload whenever the lock list changes, so tooltips and the recipe-book overlay update live.


For challenge runners

A typical run flow:

  1. Create a fresh world. The lock list persists per-save, so don't reuse old ones.
  2. Run /craftlock start to begin enforcement. Until you do, the mod runs in observe-only mode.
  3. Plan your path. Eye of Ender and Blaze Powder are exempt, so the End is reachable. Everything else — every single recipe — locks on first craft.
  4. Use /craftlock reset between filming takes if you need to redo a segment.
  5. Use /craftlock list to audit what you've spent.

Tip for editors: the yellow chat broadcasts (Chompii has crafted: ...) are designed to be readable in compressed YouTube footage and pair well with the bell ping for "milestone moment" cuts.


Building from source

git clone <repository-url>
cd CraftLock
./gradlew build

The compiled jar lands in build/libs/.

For development you can use:

./gradlew runClient   # launch a dev client with the mod loaded
./gradlew runServer   # launch a dedicated dev server
./gradlew genSources  # decompile Minecraft for IDE navigation

Credits

Made by Chompii.

Built on the Fabric modding toolchain. Powered by SpongePowered Mixin and MixinExtras.


License

Released under the CraftLock License — see LICENSE for the full text.

In short:

  • You may use, modify, distribute, fork, repackage, and embed the mod.
  • You must credit Chompii visibly in any use of the mod (video descriptions, modpack credits, derivative mod readmes, etc.).
  • You may not claim to be the original author of CraftLock.
  • The software is provided "as is" with no warranty.

If you're publishing a video, a fair-use credit looks like:

"Featuring CraftLock by Chompii — github.com/Chompii/CraftLock"

Партнёрский материал

Как поиграть с друзьями с модом CraftLock?

Мод CraftLock куда интереснее в компании: поднимите сервер Майнкрафт с уже установленным модом, позовите друзей и играйте по своим правилам. Хостинг Майнкрафт для мода CraftLock будет готов за пару минут - BungeeHost сделает всё за вас.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Зависимости

Ссылки

Создатели

Детали

Лицензия:
Опубликован:4 месяца назад
Обновлён:4 месяца назад
Главная