跳到正文
烈焰甘蔗Wiki

Wand Rods

thaumcraft.api.wands.WandRod

Wand rods determine a wand’s vis capacity and may provide special passive effects. Rods are registered statically and used to generate wand crafting recipes.

WandRod

Fields

Field Type Description
tag String Rod tag string. getResearch() 返回 "ROD_" + tag(wands/WandRod.java:151)。
capacity int Vis storage capacity. Multiplied by 100 internally (e.g. 25 → 2500 vis).
craftCost int Crafting cost added to the wand’s total craft cost.
texture ResourceLocation Texture path: thaumcraft:textures/models/wand_rod_<tag>.png.
item ItemStack The crafting ingredient that forms the rod.
onUpdate IWandRodOnUpdate Optional callback triggered each tick the wand is held.
glow boolean Whether the rod emits light in the dark.

Key Methods

Method Description
getCapacity() Returns vis capacity (as stored, not multiplied).
getTag() Returns the rod’s tag string. getResearch() 返回 "ROD_" + getTag().
getCraftCost() Returns crafting cost.
getTexture() Returns the ResourceLocation of the rod’s texture.
getItem() Returns the ItemStack used as the crafting ingredient.
getOnUpdate() Returns the IWandRodOnUpdate handler, if any.
isGlowing() Returns whether the rod glows.
setGlowing(boolean) Sets the glow state.
getResearch() Returns "ROD_" + getTag() (wands/WandRod.java:151). Player must complete this research to craft the wand.

Constructors

// Basic constructor
new WandRod(String tag, int capacity, ItemStack item, int craftCost)

// With custom texture
new WandRod(String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture)

// With onUpdate callback
new WandRod(String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate)

// With onUpdate callback and custom texture
new WandRod(String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate, ResourceLocation texture)

Static Registry

public static LinkedHashMap<String, WandRod> rods

All registered rods. Keyed by tag string (without _staff suffix).


StaffRod

thaumcraft.api.wands.StaffRod extends WandRod

Staff rods are a variant of wand rods specifically for crafting staves. They differ only in naming and texture conventions:

  • Tag is stored as <tag>_staff internally.
  • Texture path: thaumcraft:textures/models/wand_rod_<tag>.png (same pattern as WandRod, but applied to staff).
  • Supports an optional hasRunes boolean for visual decoration.

Constructors

Same as WandRod, plus:

new StaffRod(String tag, int capacity, ItemStack item, int craftCost)
new StaffRod(String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate)
new StaffRod(String tag, int capacity, ItemStack item, int craftCost, ResourceLocation texture)
new StaffRod(String tag, int capacity, ItemStack item, int craftCost, IWandRodOnUpdate onUpdate, ResourceLocation texture)

Methods

Method Description
hasRunes() Returns true if the staff has rune decoration.
setRunes(boolean) Sets whether the staff has rune decoration.

Research Key

getResearch()  // Returns "ROD_<tag>_staff"

Known Rod Types

⚠️ 已订正(原表几乎全为编造) 原条目以「The following rod types are registered in the main Thaumcraft mod」为标题, 列了 16 行杖芯数据。本 API 仓内没有任何实际注册过的杖芯——WandRod.rods 是个空的 LinkedHashMap(wands/WandRod.java:52),只有构造器执行时 rods.put(tag, this) 才会写入 (wands/WandRod.java:60/69/79/88),而本仓不创建任何 WandRod 实例。

原表里有源码依据的只有 2 行,且它们来自 WandRod.java:156-157 里被注释掉的示例代码, 不是注册项:

Tag Capacity Craft Item Craft Cost 证据
wood 25 Item.stick 1 wands/WandRod.java:156(注释行)
blaze 100 Item.blazeRod 7 wands/WandRod.java:157(注释行,附 new WandRodBlazeOnUpdate())

其余 14 行(carminite / cloth / darksoul / dreamwood / eldritch / glowstone / gold / greatwood / ice / infused_iron / obsidian / quartz / silverwood / thaumium / vinteum) 的容量、配方物、费用全部无法核实,已删除;原表里的 ??? 占位符也一并清除。

⚠️ 跨 mod 污染:原表把 **carminite(绯红杖芯)**列为 Thaumcraft 的杖芯—— 这是 Thaumic Insurgence 的内容,不是 Thaumcraft 的。已整行删除。 若要记录 carminite,应归到 ../thaumicinsurance 分类,不属于本条目。


IWandRodOnUpdate

thaumcraft.api.wands.IWandRodOnUpdate

Optional interface implemented by a class to receive tick callbacks from a wand rod.

public interface IWandRodOnUpdate {
    void onUpdate(ItemStack itemstack, EntityPlayer player);
}

Called every tick while the player is holding the wand.

Example Implementation

public class MyRodOnUpdate implements IWandRodOnUpdate {
    @Override
    public void onUpdate(ItemStack wandstack, EntityPlayer player) {
        // Called every tick while held
        // Example: add a visual particle effect or apply a passive buff
    }
}
浏览全部模组