promotional bannermobile promotional banner

Hidden materials

Using CraftTweaker script to control the display of material pages in the Tinkers' Antique (Materials and You) book in Minecraft 1.12.2

Using CraftTweaker scripts to control the display of material pages in the Tinkers' Antique (Materials and You) book in Minecraft 1.12.2, linked with Game Stages


API

ZenScript class: mods.hiddenmaterials.MaterialStages

method

require(material, stage)

unlocks the stage before displaying the material (equivalent to writing only one stage's requireAll) 

requireAll(material, stages...)

requires all stages to be owned simultaneously 

requireAny(material, stages...)

requires any one stage to be owned

remove(material)

deletes the rules for this material

clear() deletes all rules

getAllMaterialNames()

returns all available material identifiers (String[]) for name lookup 

getRules()

returns a readable snapshot of the current rules (String, one per line) for debugging


example

// 1) 解锁单个阶段后显示 ------------------------------------------------------
// 拥有 stage_iron 的玩家才会在书里看到铁
mods.hiddenmaterials.MaterialStages.require("tconstruct:iron", "stage_iron");

// 2) 需要同时拥有多个阶段 ----------------------------------------------------
// 需要同时拥有 stage_smeltery 与 stage_nether
mods.hiddenmaterials.MaterialStages.requireAll("cobalt", ["stage_smeltery", "stage_nether"]);

// 3) 任意一个阶段即可 --------------------------------------------------------
// stage_nether 或 stage_end 任意一个
mods.hiddenmaterials.MaterialStages.requireAny("manyullyn", "stage_nether", "stage_end");

// 4) 批量隐藏基础材料,随进度解锁 --------------------------------------------
val starterMaterials = [
    "wood",
    "stone",
    "flint",
    "bone",
    "cactus",
    "obsidian"
];

for material in starterMaterials {
    mods.hiddenmaterials.MaterialStages.require(material, "stage_tinkers_start");
}

// 5) 移除 / 清空 -------------------------------------------------------------
// mods.hiddenmaterials.MaterialStages.remove("cobalt");
// mods.hiddenmaterials.MaterialStages.clear();

// 6) 调试:查看全部可用材料名与当前规则 --------------------------------------
// print(mods.hiddenmaterials.MaterialStages.getAllMaterialNames());
// print(mods.hiddenmaterials.MaterialStages.getRules());

Hidden materials Team

profile avatar
  • 4
    Projects
  • 5.1K
    Downloads

More from pingsu_88666View all

  • Multiblocked2 Unofficial project image

    Multiblocked2 Unofficial

    Multiblocked2-unofficial is forked from the Minecraft 1.20.1 version of Multiblocked 2. It keeps all features from the original mod, merges mbd2thread, fixes several bugs, and adds methods and events that are more useful for modpack customization

    • 4.6K
    • October 23, 2026
  • Hex Casting: Legacy project image

    Hex Casting: Legacy

    This project is based on the upstream Hex Casting project and is maintained as a legacy branch for 1.12.2.

    • 182
    • October 10, 2026
  • Applied Ember project image

    Applied Ember

    Enhance the support of Applied Energistics 2 for Embers in Embers Rekindled

    • 311
    • September 23, 2026
  • TS Modify project image

    TS Modify

    TS Modify is a utility mod for Minecraft Forge 1.20.1 and KubeJS. It lets KubeJS scripts use TypeScript, automatically transpiling them into Rhino-compatible JavaScript at runtime, with module imports, and script compilation caching.

    • 154
    • September 12, 2026
  • Multiblocked2 Unofficial project image

    Multiblocked2 Unofficial

    Multiblocked2-unofficial is forked from the Minecraft 1.20.1 version of Multiblocked 2. It keeps all features from the original mod, merges mbd2thread, fixes several bugs, and adds methods and events that are more useful for modpack customization

    • 4.6K
    • October 23, 2026
  • Hex Casting: Legacy project image

    Hex Casting: Legacy

    This project is based on the upstream Hex Casting project and is maintained as a legacy branch for 1.12.2.

    • 182
    • October 10, 2026
  • Applied Ember project image

    Applied Ember

    Enhance the support of Applied Energistics 2 for Embers in Embers Rekindled

    • 311
    • September 23, 2026
  • TS Modify project image

    TS Modify

    TS Modify is a utility mod for Minecraft Forge 1.20.1 and KubeJS. It lets KubeJS scripts use TypeScript, automatically transpiling them into Rhino-compatible JavaScript at runtime, with module imports, and script compilation caching.

    • 154
    • September 12, 2026