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
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).
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_" + tag. 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:

Tag Capacity Craft Item Craft Cost Special
wood 25 Stick 1 None
blaze 100 Blaze Rod 7 OnUpdate: fire-related passive
carminite ??? Carminite ??? OnUpdate: redstone-related passive
cloth ??? Wool ??? None
darksoul ??? ??? ??? ???
dreamwood ??? Dreamwood Plank ??? ???
eldritch ??? ??? ??? ???
glowstone ??? Glowstone Dust ??? Glow
gold ??? Gold Ingot ??? ???
greatwood ??? Greatwood Plank ??? ???
ice ??? Ice ??? ???
infused_iron ??? Iron Ingot (Infused) ??? ???
obsidian ??? Obsidian ??? ???
quartz ??? Nether Quartz ??? ???
silverwood ??? Silverwood Plank ??? ???
thaumium ??? Thaumium Ingot ??? ???
vinteum ??? Vinteum Dust ??? ???

Note: Exact capacity and craft cost values for each rod type are defined in the main Thaumcraft mod. The API only provides the registration mechanism.


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
    }
}