-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Vis discounts are integer percentage points. A scripted value replaces an item's native discount; the two values are never added together. Aspect-specific values take precedence over the universal value for that aspect.
Negative values are also supported, incuring a penalty instead. if the discount is set to 0, the associated tooltip will be removed.
// Set a universal 5% vis discount.
mods.thaumcraft.VisDiscount.set(<minecraft:golden_helmet>, 5);
// Override only the Aer discount with 12%.
mods.thaumcraft.VisDiscount.set(<minecraft:golden_helmet>, <aspect:aer>, 12);Only equipped armor and Baubles contribute. Expanded Baubles slots beyond the original four are supported.
Research can be hidden until the player completes one or more Thaumometer scans. Every require... call adds an
independent requirement, so calls for the same research key are combined with AND.
// BONEBOW is revealed only after scanning both a bow and a bone.
mods.thaumcraft.ResearchScanGates.requireItem("BONEBOW", <minecraft:bow>);
mods.thaumcraft.ResearchScanGates.requireItem("BONEBOW", <minecraft:bone>);
// MIRROR is revealed only after scanning an Enderman and an ender pearl.
mods.thaumcraft.ResearchScanGates.requireEntity("MIRROR", "Enderman");
mods.thaumcraft.ResearchScanGates.requireItem("MIRROR", <minecraft:ender_pearl>);
// Wildcards work too: any planks AND a cow.
mods.thaumcraft.ResearchScanGates.requireItem("TINYGLASSES", <minecraft:planks:*>);
mods.thaumcraft.ResearchScanGates.requireEntity("TINYGLASSES", "Cow");Use requireAnyItem or requireAnyEntity to make one requirement accept alternatives. Alternatives within that one
call are combined with OR, while separate calls are still combined with AND.
// (red wool OR blue wool) AND (Cow OR Mooshroom)
mods.thaumcraft.ResearchScanGates.requireAnyItem(
"BANNERS",
[<minecraft:wool:14>, <minecraft:wool:11>]
);
mods.thaumcraft.ResearchScanGates.requireAnyEntity(
"BANNERS",
["Cow", "MushroomCow"]
);Clear every scripted requirement for an entry without deleting or recreating the research:
mods.thaumcraft.ResearchScanGates.clear("BANNERS");While a gate is active, it replaces that entry's native item, entity, and aspect discovery triggers and hides it until all gate requirements are met. Clearing or undoing the gate restores its original triggers and visibility flags. Progress is stored per player, and a target scanned before a gate was installed may be scanned once more to recover the missing requirement without awarding aspects twice. Entities still need registered Thaumcraft aspects to be valid scan targets. Fully qualified calls such as the examples require no import. In a dedicated pack, distribute the gate scripts to both client and server; the client copy is needed to recognize recovery scans of previously scanned targets.
Please note that certain tomfoolery regarding the research being automatically hidden and lines not connecting properly are courtesy of base Thaumcraft and therefore probably wont be patched.