Fluid Effects
This page is about the fluid effect format since 1.19.2. For the format from 1.16 to 1.18.2, see Spilling Effects.
Fluid effects are a system added to Tinkers’ Construct in 1.19.2 used to define the behavior of fluids when used in fluid effect modifiers such as spilling, spitting, and wetting.
Effect Lists
Fluid effect JSON are defined under data/<domain>/tinkering/fluid_effects/<name>.json, though the location <domain>:<name> has no impact on behavior apart from data pack overrides.
Fluid effect JSON has the following format:
- The fluid effect list object.
- List of conditions that must pass for this fluid effect list to be loaded. If unset, the effect list is always loaded.
- A single condition that must pass.
- Fluid ingredient determining fluids receiving these effects. Ingredient amount determines the amount of fluid required to apply the effects, with the effects scaling if too little fluid.
- List of effects to apply when this fluid is applied to a block. Notably applies from spitting projectiles or splashing.
- A block fluid effect.
- Block effect ID.
- Any additional fields defined by the block effect.
- A block fluid effect.
- List of effects to apply when this fluid is applied to an entity. All forms of fluid effect modifiers make use of entity effects.
- An entity fluid effect.
- Entity effect ID.
- Any additional fields defined by the entity effect.
- An entity fluid effect.
- List of conditions that must pass for this fluid effect list to be loaded. If unset, the effect list is always loaded.
Fluid effects have a level, which is typically determined by the modifier level. This level acts as a multiplier on the amount of fluid consumed, as defined by fluid. If too little fluid exists in the tool, the effect will be scaled down, though not every effect supports scaling. Some modifiers will consume less fluid if the effect does not scale, while others will consume the fluid but perform no additional effect.
Block Effects
Block effects are applied when a fluid hits a block. The follow sections describe specific block fluid effects.
Conditional Block Effect
The conditional block effect applies a block effect conditioned on the fluid hitting a block matching the block predicate. It has the following format:
- Block effect object.
- Always
tconstruct:conditional. - Block predicate determining when to apply the effect.
- Effect to apply if the condition matches.
- Always
Place Block
The place block effect places a block at the location the fluid hits. The block is placed as if it were placed by the player when possible. This effect requires a full level of fluid to place a block, and never consumes more than 1 level. It has the following format:
- Block effect object.
- Always
tconstruct:place_block. - Block to place.
- Always
Mob Effect Cloud
The mob effect cloud block effect places an area effect cloud on the block where the fluid hits (similar to a lingering potion). This effect scales the effect duration based on the level, consuming the relevant fluid. It has the following format:
- Block effect object.
- Always
tconstruct:mob_effect_cloud. - List of effects to apply.
- An effect to apply.
- Mob effect to apply.
- Duration of the effect in ticks.
- Level of the effect to apply. If unset, defaults to 1.
- List of items which may cure the effect, using Forge’s curative item system. If unset, the effect is cured by it’s default curative items. If an empty list, nothing will cure the effect.
- An item which may cure this effect.
- An effect to apply.
- Always
Potion Cloud
The potion cloud block effect places an area effect cloud on the block where the fluid hits (similar to a lingering potion) with effects based on the fluid’s NBT. This effect will only produce useful effects if the fluid’s NBT format matches the NBT format of the potion item. This effect scales the effect duration based on the level, consuming the relevant fluid. It has the following format:
- Block effect object.
- Always
tconstruct:potion_cloud. - Scaling factor to apply to the effect. 1.0 represents the same strength as drinking a potion.
- Expected NBT for the fluid, represented as a JSON object. If unset, no additional conditions are placed on the fluid NBT.
- Expected NBT for the fluid, represented as a string. If unset, no additional conditions are placed on the fluid NBT.
- Always
Entity Effects
Entity effects are applied when a fluid hits an entity. The follow sections describe specific entity fluid effects.
Conditional Entity Effect
The conditional entity effect applies an entity effect conditioned on the fluid hitting an entity matching the entity predicate. It has the following format:
- Entity effect object.
- Always
tconstruct:conditional. - Entity predicate determining when to apply the effect.
- Effect to apply if the condition matches.
- Always
Extinguish
The extinguish entity effect removes fire from the target if they are on fire. This effect requires a full level of fluid to apply, and never consumes more than 1 level. It has the following format:
- Entity effect object.
- Always
tconstruct:extinguish.
- Always
Teleport
The teleport entity effect randomly teleports the target. It requires a full level of fluid to apply, and never consumes more than 1 level. It has the following format:
- Entity effect object.
- Always
tconstruct:teleport.
- Always
Cure Effects
The cure effects entity effect cures mob effects on the target using the given curative item. A typical curative item is milk, though mods may define other useful curative items. This effect requires a full level of fluid to apply, and never consumes more than 1 level. It has the following format:
- Entity effect object.
- Always
tconstruct:cure_effects. - Curative item to apply.
- Always
Remove Effect
The remove effect entity effect removes a mob effect from the target. This effect requires a full level of fluid to apply, and never consumes more than 1 level. It has the following format:
- Entity effect object.
- Always
tconstruct:remove_effect. - Effect to remove.
- Always
Mob Effect
The mob effect entity effect applies a mob effect to the target. The duration of the effect is scaled based on the fluid amount, consuming any relevant fluid. It has the following format:
- Entity effect object.
- Always
tconstruct:mob_effect. - Mob effect to apply.
- Duration of the effect in ticks.
- Level of the effect to apply. If unset, defaults to 1.
- List of items which may cure the effect, using Forge’s curative item system. If unset, the effect is cured by it’s default curative items. If an empty list, nothing will cure the effect.
- An item which may cure this effect.
- Determines how the effect scales if the entity already has the effect. The following options are available:
add: The duration of the effect is increased if the existing level matcheslevel.set: The duration of the effect is set totime, consuming fluid based on the duration increase.
- Always
Potion
The potion entity effect applies effects to the target effects based on the fluid’s NBT. This effect will only produce useful effects if the fluid’s NBT format matches the NBT format of the potion item. This effect scales the effect duration based on the level, consuming fluid based on the added duration. It has the following format:
- Entity effect object.
- Always
tconstruct:potion. - Scaling factor to apply to the effect. 1.0 represents the same strength as drinking a potion.
- Expected NBT for the fluid, represented as a JSON object. If unset, no additional conditions are placed on the fluid NBT.
- Expected NBT for the fluid, represented as a string. If unset, no additional conditions are placed on the fluid NBT.
- Always
Damage
The damage entity effect damages the target, either with projectile damage if used in a projectile context or direct damage otherwise. It has the following format:
- Entity effect object.
- Always
tconstruct:damage. - Damage to deal.
- Object containing a pair of damage type IDs to use when applying this effect. If unset, uses the generic player attack/mob attack for melee, and mob projectile for ranged.
- Damage type to use for melee applications, such as spilling or splashing.
- Damage type to use for ranged, such as spitting.
- List of modifiers to apply to the damage. If unset, applies no modifiers.
- Modifier to apply. The following options are available by default:
tconstruct:fire: Makes the damage count as fire damage.tconstruct:explosion: Makes the damage count as explosion damage.tconstruct:magic: Makes the damage count as magic damage.tconstruct:fall: Makes the damage count as fall damage.tconstruct:no_aggro: Prevents aggrovating the target of the damage.tconstruct:bypass_armor: Makes the damage bypass armor values.tconstruct:bypass_enchantments: Makes the damage bypass protection enchantments.tconstruct:bypass_magic: Makes the damage bypass potion effects such as resistance and protection enchantments.
- Modifier to apply. The following options are available by default:
- Always
Restore Hunger
The restore hunger entity effect gives the target hunger and saturation. It has the following format:
- Entity effect object.
- Always
tconstruct:restore_hunger. - Amount of hunger to restore.
- Amount of saturation to restore.
- If true, this effect will always apply. If false, this effect will only apply if the target is hungry, consuming no fluid if they are not hungry.
- Food item equivalent to drinking this fluid. Used for compatibility with the diet mod so the proper types of nutrition are restored. If unset, skips the compatibility call.
- Always
Fire
The fire entity effect lights the target on fire. It has the following format:
- Entity effect object.
- Always
tconstruct:fire. - Duration of the effect in seconds.
- Determines how the effect scales if the entity already is on fire. The following options are available:
add: The fire duration is increased bytime.set: The fire duration is set totime, consuming fluid based on the duration increase.
- Always
Freeze
The freeze entity effect makes the target freeze, applying similar behavior to standing in powdered snow. It has the following format:
- Entity effect object.
- Always
tconstruct:freeze. - Duration of the effect in ticks. Will be added to the minimum ticks required to freeze.
- Determines how the effect scales if the entity already is on fire. The following options are available:
add: The fire duration is increased bytime.set: The fire duration is set totime, consuming fluid based on the duration increase.
- Always
Award Stat
The award stat entity effect awards a stat to the target. It is used notably to change insomnia levels with some fluids. It has the following format:
- Entity effect object.
- Always
tconstruct:award_stat. - Stat to apply.
- Stat amount to reward, will be scaled by the fluid level. May be negative.
- Always
Add Breath
The add breath entity effect increases or decreases the target’s air supply. It has the following format:
- Entity effect object.
- Always
tconstruct:add_breath. - Breath to add to the target, will be scaled by the fluid level. May be negative.
- Always
Calcified
The calcified fluid effect implements behavior for several modifiers that apply boosts when drinking milk. Notably, it applies resistance if the entity is wearing a helmet with the strong bones modifier. In addition, it applies the calcified effect if the entity is wearing any equipment that uses that effect. The duration of the effect is scaled based on the fluid amount. It has the following format:
- Entity effect object.
- Always
tconstruct:calcified.
- Always