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 支持哪些 Minecraft 版本?
Hidden materials 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Hidden materials 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
pingsu_88666 的其他作品
查看全部 →Multiblocked2 Unofficial
Multiblocked2-unofficial 是基于 Minecraft 1.20.1 版 Multiblocked 2 分支开发的版本。它保留原模组的所有功能,整合了 mbd2thread,修复了多个问题,并新增了更适合整合包自定义的方法和事件。
Applied Ember
Enhance the support of Applied Energistics 2 for Embers in Embers Rekindled
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.
评论
登录后评论和评分