StatTweaker

StatTweaker

80 Downloads

Requires ASJCore (check files description for version info)

Support me on Patreon Discord

MineTweaker3/CraftTweaker addon for configuring attributes and other common stats for mobs, tools, weapons and armor. Balancing your modpack never been so easy.

Open for feature requests.

Documentation (real examples are coming soon):

Note: All lines must start with mods.StatTweaker. (omitted here for shortness).

Parameters are written in form of (parameter_name: Parameter_type)

EntityName type - String literal (in double quotes like "this") of registry entity name (as seen in /summon command autocompletions)

Int for Integer numbers. Float and Double are both for floating-point numbers, Double is just with double decimal precision.

Question mark after type indicates that this value can be null (no ? - no null allowed) - use it if you want to leave that value unchanged.

Regarding material changing functions - if parameter is red-colored it's value won't reflect on items, only on material itself.

Warning: All functions may not work with one or the other mob because it's code may be written in non-standard way. Known exceptions will be noted.

Changes default mob's attributes (if those are registered) base values. If maxHealth was changed, entity's health will be set to max on spawn.

setDefaultAttributes(name: EntityName, maxHealth: Double?, followRange: Double?, knockbackResistance: Double?, movementSpeed: Double?, attackDamage: Double?)

Used to avoid above health set behavior. (ex: Wither's health charge when it raises health from 0 to 300 after summon structure is created; Gaia from Botania or Flügel from Alfheim are good examples too)

blacklistSetHealth(name: EntityName)

Changes custom mob's attributes base values. Warning: this WON'T add new attributes.

setCustomAttributes(name: EntityName, attr: String, value: Double)

Set new XP drop value for mob. Warning: this won't affect animals.

setXP(name: EntityName, newXP: Int)

Step height is how high animal can climb without jumping. Default is 0.5 - because of that mob don't need to jump to get on slabs. You can put 1 to allow one block step or 1.5 to make it able to get over the fence. This won't reflect on jump height though.

setStepHeight(name: EntityName, stepHeight: Float)

Entity's hitbox sizes (as seen if you hit F3+B)

setSize(name: EntityName, width: Float, height: Float)

This will change how much hp entity gains from healing. (ex: if you change Wither's health from 300 to 900, you may want to change it's charging heal value from 10 to 30 so the animation won't break. And this won't reflect on its +1hp regeneration after it was fully charged - to change it use 1 and 3 values for example)

changeHealing(name: EntityName, old: Float, new: Float)

Adds new regeneration value for every set amount of ticks entity existed in world.

addHealing(name: EntityName, frequency: Int, amount: Float)

Adds (or changes) mob's NBT values. NBT string syntax is the same as tag syntax in /summon command, NOT as default MineTweaker syntax. Suggestion: use NBTEdit mod to see NBT tags in mobs.

addNBT(name: EntityName, nbt: String)

Properties for Tool Material

toolProperties(name: String, harvestLevel: Int?, durability: Int?, efficiency: Float?, damage: Float?, enchantability: Int?)

Properties for Armor Material. Durability Factor is NOT the durability itself, just multiply factor for default values. Protection parameter is an Array

armorProperties(name: String, durabilityFactor: Int?, protection: IntArray, enchantability: Int?)

Sword item properties

swordProps(item: ItemStack, damage: Float, durability: Int)

Tool item properties

toolProperties(item: ItemStack, efficiency: Float, damage: Float, durability: Int)

Armor item properties (only one piece)

armorProperties(item: ItemStack, protection: Int, durability: Int)