What Is StatTweaker and Why Your Modpack Needs It
Balancing a custom Minecraft modpack often feels like solving a puzzle with missing pieces. You have dozens of mods adding creatures, tools, and armor, but their stats rarely align perfectly. One mob might be absurdly weak while another one-shots players. A diamond sword from one mod could be outclassed by a stone axe from another. StatTweaker steps in as the ultimate fine-tuning tool, giving you precise control over entity attributes, material properties, and item stats without writing a single line of Java.
Built as an addon for MineTweaker3 or CraftTweaker, StatTweaker extends the scripting power you already know. It requires ASJCore to function, so make sure you grab the correct version from the file description. Once installed, you can adjust health, speed, damage, knockback resistance, and even hitbox sizes for any mob, including players. The mod also lets you redefine repair materials, enchantability, harvest levels, and durability for tools and armor. In short, it transforms chaotic mod interactions into a cohesive, balanced experience.
Key Features at a Glance
- Modify default and custom entity attributes with simple script commands.
- Change healing values, XP drops, step height, and NBT tags for mobs.
- Override armor and tool material properties, including repair items.
- Tweak individual item stats like stack size, damage, and efficiency.
- Special support for Thaumcraft 4 warping and runic shielding (requires config toggle).
- All functions use a consistent syntax starting with
mods.StatTweaker.or import statements.
Controlling Every Aspect of Mobs
Imagine a Wither with triple its normal health, or a zombie that hits as hard as an iron golem. StatTweaker makes these scenarios possible through its entity functions. The setDefaultAttributes command accepts parameters for maxHealth, followRange, knockbackResistance, movementSpeed, and attackDamage. You can leave any value unchanged by passing null. For example, to boost the Wither’s maximum health to 900, you would write:
setDefaultAttributes("WitherBoss", 900.0, null, null, null, null);
But there is a catch: when maxHealth changes, the entity spawns with full health. That can break custom boss sequences, like the Wither’s health charge animation. Use blacklistSetHealth to prevent that automatic health reset. Then adjust the healing ticks with changeHealing so the boss still charges correctly. For instance, changing the Wither’s 10 HP charge to 30 HP keeps the visual timing intact.
Custom attributes from other mods are also within reach. The setCustomAttributes function targets specific attribute names, such as adding a runic shield to Thaumcraft’s Crimson Knights. You can even alter hitbox dimensions with setSize, letting ocelots squeeze under half-slabs, or give chickens a step height of 5.0 so they “fly” up blocks. Every tweak uses the entity’s registry name, exactly as seen in the /summon command autocompletion.
Materials and Items: The Foundation of Balance
StatTweaker does not stop at living entities. The material system governs how tools and armor behave. You can change which items repair a given material. For example, diamond gear normally requires diamonds for repair, but you might add emeralds as an alternative. The command changeArmorRepairMaterials("DIAMOND", [<minecraft:diamond>, <minecraft:emerald>]); does exactly that. Similarly, stone tools can be repaired with smooth stone instead of just cobblestone.
Material properties like harvest level, efficiency, enchantability, and base damage are all configurable. Want a stone pickaxe that can mine obsidian? Set its harvest level to 3. Need leather armor to be highly enchantable? Raise the enchantability value. These changes affect every item made from that material, ensuring consistency across your pack.
Individual item overrides offer even finer control. The armorProperties, toolProperties, and swordProperties functions let you tweak a specific piece. A golden chestplate can match iron’s protection, a golden shovel can become absurdly fast, and a gold sword can deal 6 attack damage. Stack sizes are also adjustable: eggs can stack to 64 with a single line. This granularity is invaluable when a mod adds a unique item that breaks your intended progression.
Thaumcraft Integration and Advanced Tricks
If Thaumcraft 4 is part of your modpack, StatTweaker includes dedicated functions under mods.StatTweakerTC. You must enable TC support in the config file first. Then you can override warping amounts on any item—imagine a diamond sword that carries 5 warp, making it a dangerous but tempting choice. Runic shielding can be added to armor pieces that normally lack it, giving a diamond chestplate a base runic shield of 10. These tweaks integrate seamlessly with the mod’s lore while letting you shape the difficulty curve.
For those who enjoy a streamlined modding experience, the foxygame.net launcher provides a modern, flexible way to manage your installations. You can browse and add StatTweaker directly from its built-in mod library, skipping the manual file hunt and ensuring compatibility with your existing setup. This convenience makes experimenting with balance scripts much faster, especially when you are iterating on a custom pack.
NBT manipulation is another powerful feature. Using the same tag syntax as the /summon command, you can add permanent NBT data to any mob. For instance, making all creepers spawn powered like they were struck by lightning: addNBT("Creeper", "{powered:1}");. Potion caps are also possible—limit the Strength effect to level 2 globally, preventing overpowered potion combos. These tools let you enforce rules that keep gameplay challenging but fair.
Getting Started and Best Practices
All StatTweaker scripts live in your MineTweaker/CraftTweaker script folder. Remember that every line must begin with mods.StatTweaker. unless you use an import statement at the top of the file. The documentation provides a handy example file (StatTweaker.zs) to get you started. Parameters are clearly typed: EntityName is a string literal, Int for whole numbers, Float and Double for decimals. A question mark after a type means the value can be null, allowing you to skip changes you do not need.
Be aware that some mobs or items may not respond to every function due to non-standard code. Known exceptions are noted in the documentation. Always test your changes in a creative world before deploying them to a server. Start with small adjustments—like doubling pig health or reducing skeleton follow range—to get a feel for the syntax. Then gradually build a comprehensive balance overhaul that makes your modpack feel polished and intentional.
StatTweaker turns the often tedious task of stat harmonization into a creative scripting exercise. Whether you are taming an overpowered mod boss, making early-game tools viable longer, or adding quirky behaviors like super-jumping chickens, this addon puts the power in your hands. With a bit of experimentation, your modpack will deliver exactly the challenge and progression you envision.