Wand Caps
thaumcraft.api.wands.WandCap
Wand caps (cappings) determine a wand’s vis discount and crafting cost. Caps are registered statically and used to generate wand crafting recipes.
WandCap
Fields
| Field | Type | Description |
|---|---|---|
baseCostModifier |
float |
Multiplier for all aspect costs. Higher = more expensive. 1.0 = normal cost. |
specialCostModifierAspects |
List<Aspect> |
Primal aspects that use a special discount rate. |
specialCostModifier |
float |
Discount multiplier for the specified aspects. |
craftCost |
int |
Crafting cost added to the wand’s total craft cost. |
texture |
ResourceLocation |
Texture path: thaumcraft:textures/models/wand_cap_<tag>.png. |
item |
ItemStack |
The crafting ingredient that forms the cap. |
Key Methods
| Method | Description |
|---|---|
getBaseCostModifier() |
Returns the base cost multiplier. |
getSpecialCostModifierAspects() |
Returns list of aspects using the special discount. |
getSpecialCostModifier() |
Returns the special cost multiplier. |
getCraftCost() |
Returns crafting cost. |
getTexture() |
Returns the ResourceLocation of the cap’s texture. |
getItem() |
Returns the ItemStack used as the crafting ingredient. |
getResearch() |
Returns "CAP_" + tag. Player must complete this research to craft the wand. |
Constructors
// Basic constructor (uniform discount for all aspects)
new WandCap(String tag, float discount, ItemStack item, int craftCost)
// Advanced constructor (different discount for specific aspects)
new WandCap(String tag, float discount, List<Aspect> specialAspects, float discountSpecial, ItemStack item, int craftCost)
Static Registry
public static LinkedHashMap<String, WandCap> caps
All registered caps. Keyed by tag string.
Cost Modifier System
The wand cap’s discount system works as follows:
- Base discount (
baseCostModifier): Applied to all aspect costs. - Special discount (
specialCostModifier): Applied only to specific primal aspects listed inspecialCostModifierAspects.
Example
// Iron cap: 1.1x cost for all aspects except ORDER, which gets 1x
new WandCap("iron", 1.1f,
Arrays.asList(Aspect.ORDER), 1.0f,
new ItemStack(ConfigItems.itemWandCap, 1, 0), 1);
Discount vs. Cost
The modifier is a cost multiplier (not a discount):
1.0= normal cost (no modifier)0.9= 10% cheaper1.1= 10% more expensive
A lower baseCostModifier is generally better for wand efficiency.
Known Cap Types
The following cap types are registered in the main Thaumcraft mod:
| Tag | Base Cost Modifier | Special Aspects | Special Cost | Craft Item | Craft Cost |
|---|---|---|---|---|---|
brass |
??? | — | — | Brass Ingot | ??? |
copper |
??? | — | — | Copper Ingot | ??? |
gold |
1.0 | — | — | Gold Ingot | 3 |
iron |
1.1 | ORDER | 1.0 | Iron Ingot | 1 |
silver |
??? | — | — | Silver Ingot | ??? |
thaumium |
??? | — | — | Thaumium Ingot | ??? |
void |
??? | — | — | Void Metal Ingot | ??? |
wood |
??? | — | — | Wood Planks | ??? |
Note: Exact values for each cap type are defined in the main Thaumcraft mod. The API only provides the registration mechanism.
Crafting
Wand caps are combined with wand rods in Thaumcraft’s arcane crafting system to produce complete wands. The crafting recipe is automatically generated based on the registered item and craftCost values for both the rod and cap.
Research Requirement
To craft a wand with a specific cap, the player must complete research keyed at "CAP_<tag>" (e.g. "CAP_iron").
Example Registration
// Register a gold cap with 1.0 base cost modifier (no discount)
WandCap WAND_CAP_GOLD = new WandCap(
"gold", // tag
1.0f, // base cost modifier
new ItemStack(ConfigItems.itemWandCap, 1, 1), // gold wand cap item
3 // craft cost
);