注入配方

基本信息

属性 值
生物注入配方 new CreatureInfusionRecipe( 30
自身注入配方 new SelfInfusionRecipe( 10
合计 40
注册区间 common/ThaumicHorizons.java:3198-3644(postInit 内)
存储容器 critterRecipes / selfRecipes,均为 ArrayList
匹配入口 getCreatureInfusion(...)(:3649)、getSelfInfusion(...)(:3665)
配方类 common/lib/CreatureInfusionRecipe.java、common/lib/SelfInfusionRecipe.java

**生物注入(Creature Infusion)**是本模组的招牌机制:把一个生物实体放进治疗槽,用周围放置的物品「注入」出另一个实体。**自身注入(Self Infusion)**是同一套机制的玩家版本,槽内没有生物、只有玩家自己。两者共用 AspectList 要素消耗与 ItemStack[] 组件匹配,但构造函数不同、槽位不同,故分两张表。

粒度选择:40 条配方共用两个类与同一个注册方法,字段结构完全一致(研究 id / 输出 / 不稳定度 / 要素 / 组件),彼此无独立行为代码。按本 wiki 惯例合并为一页两张表,不拆成 40 个文件。

构造函数参数

common/lib/CreatureInfusionRecipe.java:28 的签名:

CreatureInfusionRecipe(String research, Object output, int inst,
                       AspectList aspects, Class input, ItemStack[] recipe, int id)
参数 含义
research 关联研究 id,只用于解锁判定
output 产出实体 ID(null 类槽位配方写字符串 tag)
inst 不稳定度 instability,越高越容易失败
aspects 要素消耗
input 被注入实体的类;null 表示不限实体
recipe 槽内组件
id 内部 id(构造顺序决定,不参与匹配)

common/lib/SelfInfusionRecipe.java:25 的签名:

SelfInfusionRecipe(String research, int inst, AspectList aspects, ItemStack[] recipe, int id)

无 output / input —— 产出由 EntityInfusionProperties 的已授予属性决定。

生物注入(30 条,CreatureInfusionRecipe)

「输出」列抄写源码第 2 参数原值。tag 是源码里的字面字符串,null 类表示该配方接受任意实体。

行 研究 id 输出 不稳定度 要素 接受实体 组件
3199 pigInfusion 11 4 EARTH 8; HUNGER 8; METAL 16; FIRE 8 EntityPig Blocks.furnace + itemShard 1/5 + itemShard 1/1 + itemShard 1/3
3211 pigInfusion 12 6 TAINT 6; HEAL 8; PLANT 8; HUNGER 16 EntityPig blockCustomPlant 1/4 + blockMagicalLog 1/1 + blockJar 1/3 + blockMagicalLog 1/1
3224 chickenInfusion 9 2 DARKNESS 4; SLIME 4; EXCHANGE 2 EntityChicken Items.dye 1/0 + Items.shears
3233 chickenInfusion 10 6 GREED 8; METAL 8; CRAFT 16 EntityChicken Items.golden_apple + blockMetalDevice 1/9 + Items.golden_apple + blockMetalDevice 1/0
3244 cowInfusion EntityList.getEntityID(new EntityMooshroom(null)) 2 PLANT 8; BEAST 4 EntityCow Blocks.brown_mushroom + Blocks.red_mushroom + Blocks.brown_mushroom + Blocks.red_mushroom
3254 cowInfusion 7 2 HUNGER 4; EXCHANGE 2 EntityCow Items.dye 1/3 + Items.sugar + Items.dye 1/3 + Items.sugar
3264 sheepInfusion 2 2 SENSES 8; EXCHANGE 4 EntitySheep Items.dye 1/1 + Items.dye 1/4 + Items.dye 1/11
3274 sheepInfusion 3 2 TOOL 8; CLOTH 4 EntitySheep Items.shears + Items.comparator
3283 sheederInfusion 29 5 CLOTH 32; EXCHANGE 8; POISON 8 EntitySheep Blocks.web + Items.spider_eye + Blocks.web + Items.spider_eye
3293 sheederInfusion 29 5 CLOTH 32; EXCHANGE 8; MIND 16 EntitySpider itemZombieBrain + Blocks.wool ×3
3304 catInfusion 4 2 BEAST 8; WEAPON 8 EntityOcelot Items.potionitem 1/8233 + Items.saddle
3313 catInfusion 5 6 ORDER 16; DEATH 8; LIGHT 24 EntityOcelot Items.bone + Blocks.gold_block + itemResource 1/6 + blockMagicalLog 1/1
3324 catInfusion 6 4 TRAP 8; AURA 4; ENERGY 16 EntityOcelot itemShard 1/6 + Blocks.wool 1/15 + itemShard 1/6 + Items.gold_nugget
3334 dogInfusion 14 2 WATER 8; AIR 8; EXCHANGE 4; MOTION 8 EntityWolf Items.fish 32767 + itemShard 1/2 + Items.fish 32767 + Items.potionitem 1/8269
3346 dogInfusion 16 4 LIGHT 8; VOID 8; MAGIC 16; EXCHANGE 4 EntityWolf itemResource 1/14 + itemResource 1/10 + itemResource 1/14
3358 dogInfusion 15 6 FIRE 24; WEAPON 8; BEAST 8 EntityWolf Items.lava_bucket + Items.blaze_rod + itemShard 1/1 + Items.blaze_rod
3368 horseInfusion 13 6 ELDRITCH 16; TRAVEL 16; VOID 24 EntityHorse Items.ender_pearl + Items.egg + Items.ender_pearl + itemResource 1/14
3378 horseInfusion 20 2 DEATH 8; UNDEAD 8 EntityHorse Items.rotten_flesh ×4
3388 horseInfusion 21 2 DEATH 8; UNDEAD 8 EntityHorse Items.bone ×4
3398 nightmareInfusion 22 8 FIRE 32; TRAVEL 16; VOID 16 EntityEndersteed Items.nether_star + Blocks.obsidian + itemShard 1/1 + blockLifter + itemShard 1/1 + Blocks.obsidian
3412 infusionVat tag 3 MOTION 16; MECHANISM 8; FLIGHT 4 null Items.potionitem 1/8226 + itemResource 1/3 + itemResource 1/3
3426 infusionVat tag 3 WEAPON 12; METAL 8; MAGIC 8 null itemSwordThaumium + itemSwordThaumium
3438 infusionVat tag 4 HEAL 8; LIFE 16; MIND 4 null Items.speckled_melon + itemSyringeHuman + Items.golden_apple + itemSyringeHuman
3450 infusionVat tag 4 ARMOR 16; CRYSTAL 16; BEAST 8 null Items.leather + Items.diamond + Items.diamond
3462 infusionVat tag 6 ELDRITCH 16; TRAVEL 16; FLESH 16 null Items.ender_pearl + Items.egg + Items.egg
3474 infusionVat tag 5 ENERGY 16; WEAPON 12; WEATHER 4 null Items.quartz + itemShard 1/0 + Items.quartz + Items.redstone
3486 infusionVat tag 6 MIND 4; BEAST 3; EXCHANGE 3 null Items.saddle + itemZombieBrain + Items.golden_apple
3498 runicHide tag 7 ARMOR 16; MAGIC 32; ENERGY 16; FLESH 8 null Items.diamond + itemResource 1/6 + itemResource 1/7 + itemResource 1/1 + itemInkwell
3513 eldritchFangs tag 8 ELDRITCH 8; WEAPON 16; METAL 16; POISON 32 null itemResource 1/16 + blockCustomPlant 1/5 + itemResource 1/16 + blockCustomPlant 1/5
3528 infusionVat tag 6 VOID 16; TRAP 16 null ConfigBlocks.blockJar + Items.ender_pearl

「组件」列中 item* / block* 前缀即源码变量名;不带前缀者按上下文属 ConfigItems.(itemShard、itemResource、itemZombieBrain、itemSwordThaumium、itemInkwell)或 ConfigBlocks.(blockCustomPlant、blockMagicalLog、blockJar、blockMetalDevice、blockLifter、blockTable、blockTaint、blockCosmeticSolid)。

⚠️ 一处例外:itemSyringeHuman(:3438)不是 TC4 的 ConfigItems 字段(已在 mirror/thaumcraft4/thaumcraft/common/config/ConfigItems.java 中核对,0 命中),而是本模组自己的静态字段,:568 赋值为 new ItemSyringeBlood(),注册名 syringeBlood(:654)。它作为组件出现在生物注入配方里。

自身注入(10 条,SelfInfusionRecipe)

行 研究 id 不稳定度 要素 组件
3545 selfInfusion 4 MOTION 64; MECHANISM 32; FLIGHT 32 Items.potionitem 1/8226 + itemResource 1/3 + itemResource 1/16(该组 ×2)
3556 selfInfusion 5 HEAL 32; LIFE 64; MIND 32 Items.golden_apple + Items.speckled_melon ×2 + itemZombieBrain + Items.speckled_melon ×2
3565 selfInfusion 6 ARMOR 32; CRYSTAL 32; MAN 16 Items.leather_helmet + Items.diamond + Items.leather_chestplate + Blocks.diamond_block + Items.leather_leggings + Items.diamond + Items.leather_boots + Blocks.diamond_block
3575 morphicFingers 6 TOOL 32; CRAFT 32; MAN 32; EXCHANGE 16 blockTable 1/15 + itemResource 1/16 + itemShard 1/6 + itemResource 1/16
3586 silverHeart 7 ORDER 32; HEAL 32; EXCHANGE 16 blockCustomPlant 1/1 + blockMagicalLog 1/1 + blockCustomPlant 1/2 + blockMagicalLog 1/1
3596 synthSkin 6 PLANT 32; HUNGER 32; LIGHT 32; MAN 16 Blocks.leaves 32767 + Blocks.sapling 32767 + Blocks.red_flower 32767 + Blocks.vine
3606 amphibious 7 WATER 64; AIR 64; LIFE 32; EXCHANGE 16 Items.fish 32767 + Items.potionitem 1/8269(该组 ×2)
3615 warpedTumor 12 TAINT 64; ELDRITCH 48; TRAP 32; FLESH 24; EXCHANGE 16 blockTaint 1/2 + itemBathSalts 1/0 + Items.nether_star 1/0 + blockCosmeticSolid 1/0 + Items.nether_star 1/0 + itemSanitySoap 1/0
3627 spiderClimb 8 BEAST 32; MOTION 48; SLIME 32 Blocks.web + itemResource 1/7 + Blocks.web + Blocks.ladder + Blocks.web + itemResource 1/7 + Blocks.web + Blocks.ladder
3637 chameleonSkin 7 SENSES 48; EXCHANGE 32; VOID 32 Items.spider_eye + Items.dye 1/1 + Items.dye 1/4 + Items.dye 1/11 + Items.dye 1/0 + Items.dye 1/15

数值

数值名 值
生物注入配方数 30
自身注入配方数 10
合计 40
接受任意实体(input = null)的配方 10(:3412–:3528,输出均为 tag)
按实体类限定的配方 20
不同研究 id 数 20(生物注入 12 + 自身注入 8,两组无交集)
生物注入要素消耗最高单条 nightmareInfusion :3398(FIRE 32 / TRAVEL 16 / VOID 16,合计 64)
自身注入要素消耗最高单条 warpedTumor :3615(TAINT 64 / ELDRITCH 48 / TRAP 32 / FLESH 24 / EXCHANGE 16,合计 184)
最高不稳定度 12(warpedTumor)
不稳定度区间 2 – 12

死代码核验

critterRecipes 与 selfRecipes 在 :472-473 声明,唯一的实例化点是文件末尾的 static {} 静态初始化块(:4072-4077),静态块在类加载时执行,早于 FML 调用的任何实例方法,因此 postInit 里的 30 次 critterRecipes.add(...)(:3198–:3527)与 10 次 selfRecipes.add(...)(:3544–:3636)都写在列表已经存在之后,不会被后续赋值清空。全部 40 条配方在 postInit 结束时有效。

读取侧 getCreatureInfusion(:3649)与 getSelfInfusion(:3665)用 Iterator 遍历同一列表,ItemInfusionCheat(见注入与消耗品)直接调用这两个入口,说明调试物品路径与正常路径共用同一份列表。

未核实项:本表只登记源码中已构造的 40 条配方。common/lib/CreatureInfusionRecipe.java 的 matches(...) 是否还存在分支之外的额外来源(例如从配置文件或数据包追加),无法核实 —— 已检查 src/main/resources 下无该类相关的配置文件,且全仓 critterRecipes / selfRecipes 的写入点只有上述 40 处。

相关条目