AllowedTools 配置

主配置 config/iguanatweakstconstruct.cfg 的 AllowedTools 分类,控制哪些工具不受原版工具削弱影响。对应 原版工具削弱。

分类注释:

Tweak Module: This category allows you to specify which tools ARE NOT USABLE or alternatively ARE STILL USABLE if the option to disable non-TConstsruct tools is enabled. To make this easier a /dumpTools command is provided, that dumps the names of all applicable items in your world. Copy'n'Paste away!

完整选项

配置键 类型 默认 含义
exclusionType String blacklist 列表语义:blacklist = 列出的被禁用;whitelist = 列出的仍可用,其余全禁用
tools String[] 见下 斧/镐/锹(ItemTool)豁免名单
swords String[] 见下 剑(ItemSword)豁免名单
bows String[] 空 弓(ItemBow)豁免名单
hoes String[] 见下 锄(ItemHoe)豁免名单
mods String[] 见下 按 modid 整包豁免

exclusionType 是枚举配置,合法值只有 whitelist 与 blacklist:

excludedToolsIsWhitelist = "whitelist".equals(type);

生效条件

四个物品列表只在对应削弱开关为 true 时才并入豁免集合:

if (nerfVanillaTools)  excludedTools.addAll(Arrays.asList(tools));
if (nerfVanillaSwords) excludedTools.addAll(Arrays.asList(swords));
if (nerfVanillaBows)   excludedTools.addAll(Arrays.asList(bows));
if (nerfVanillaHoes)   excludedTools.addAll(Arrays.asList(hoes));

所以关掉某个削弱后,其对应豁免列表自动失效(详见 Tweaks 配置 的四个 disable* 开关,默认只有 disableRegularTools 为 true)。

mods 列表则无条件加入 excludedModTools。

默认物品名单

tools(14 项)

所属 mod 物品
Botania manasteelAxe、manasteelPick、manasteelShovel
Flaxbeards Steam Power axeGildedGold、pickGildedGold、shovelGildedGold、axeBrass、pickBrass、shovelBrass
IndustrialCraft 2 itemToolBronzeAxe、itemToolBronzePickaxe、itemToolBronzeSpade
Railcraft tool.steel.axe、tool.steel.pickaxe、tool.steel.shovel

swords(6 项)

所属 mod 物品
Botania manasteelSword
Flaxbeards Steam Power swordGildedGold、swordBrass
Thermal Expansion tool.battleWrenchInvar
IndustrialCraft 2 itemToolBronzeSword
Railcraft tool.steel.sword

hoes(4 项)

所属 mod 物品
Flaxbeards Steam Power hoeGildedGold、hoeBrass
IndustrialCraft 2 itemToolBronzeHoe
Railcraft tool.steel.hoe

bows(0 项)

private static String[] defaultExcludedBows = new String[] {};

原版弓无任何豁免。

默认 modid 名单(8 项)

private static String[] defaultAllowMod = new String[] { "minecraft", "Metallurgy", "Natura", "BiomesOPlenty",
        "ProjRed|Exploration", "appliedenergistics2", "MekanismTool", "ThermalFoundation" };
modid 说明
minecraft 原版工具整体豁免——即完全关闭削弱
Metallurgy 冶金
Natura 自然
BiomesOPlenty 盛大生物群系
ProjRed|Exploration 投影红线:探索(注意 | 需转义)
appliedenergistics2 应用能源 2(小写)
MekanismTool Mekanism 工具
ThermalFoundation Thermal Foundation

矛盾点:默认 mods 列表包含 minecraft,而 disableRegularTools 默认 true。因为 excludedModTools 判定的是 modid 而非物品名,这一条会让所有原版工具都被豁免——除非整合包在配置时把 minecraft 从 mods 中移除。这是整合包需要重点确认的默认值。

名单匹配

物品名列表按 modid:itemName 格式书写,见 ModSupportHelper 的 special-case 说明。

可用 /dumpTools 指令 导出当前世界的候选物品名,但注意该指令只导出原版四类工具(ItemTool / ItemHoe / ItemSword / ItemBow),mod 自定义工具需手写名字——因为更宽松的 getToolClasses 判定在源码中被注释掉了。