Spilling Effects
This page is about the fluid effect format from 1.16-1.18.2. For the format since 1.19, see Fluid Effects.
Spilling effects are a system used to define the behavior of fluids when used in fluid effect modifiers such as spilling, spitting, and wetting.
Effect Lists
Spilling effects JSON are defined under data/<domain>/tinkering/spilling/<name>.json
, though the location <domain>:<name>
has no impact on behavior apart from data pack overrides.
Spilling effect JSON has the following format:
- Condition that must pass for this spilling effect list to be loaded. If unset, the effect list is always loaded.
- 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.
- entity spilling effect.
- Entity effect ID.
- Any additional fields defined by the entity effect.
An
List of effects to apply when this fluid is applied to an entity.
- entity spilling effect.
The spilling effect list object.
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.
Entity Effects
Entity effects are applied when a fluid hits an entity. The follow sections describe specific entity fluid effects.
Conditional 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:
tconstruct:conditional
.
Always - Entity predicate determining when to apply the effect. Uses the legacy Tinkers’ Construct entity predicates.
- Effect to apply if the condition matches.
Entity effect object.
Extinguish
The extinguish entity effect removes fire from the target if they are on fire. It has the following format:
tconstruct:extinguish
.
Always
Entity effect object.
Teleport
The teleport entity effect randomly teleports the target. It has the following format:
tconstruct:teleport
.
Always
Entity effect object.
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. It has the following format:
tconstruct:cure_effects
.
Always - Curative item to apply.
Entity effect object.
Remove Effect
The remove effect entity effect removes a mob effect from the target. It has the following format:
tconstruct:remove_effect
.
Always - Effect to remove.
Entity effect object.
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. It has the following format:
tconstruct:effect
.
Always - Mob effect to apply.
- Duration of the effect in seconds.
- Level of the effect to apply. If unset, defaults to 1.
Entity effect object.
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:
tconstruct:potion_fluid
.
Always - 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.
Entity effect object.
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:
tconstruct:damage
.
Always - Damage to deal.
normal
: Applies damage with no special modifiers.fire
: Makes the damage count as fire damage.explosion
: Makes the damage count as explosion damage.magic
: Makes the damage count as magic damage.piercing
: Makes the damage bypass armor values.
Type of damage to apply. The following options are available by default:
Entity effect object.
Restore Hunger
The restore hunger entity effect gives the target hunger and saturation. It has the following format:
tconstruct:restore_hunger
.
Always - Amount of hunger to restore.
- Amount of saturation to restore.
- 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.
Entity effect object.
Fire
The fire entity effect lights the target on fire. It has the following format:
tconstruct:set_fire
.
Always - Duration of the effect in seconds.
Entity effect object.
Freeze
The freeze entity effect makes the target freeze, applying similar behavior to standing in powdered snow. It has the following format:
tconstruct:set_freeze
.
Always - Duration of the effect in ticks. Will be added to the larger of the minimum ticks required to freeze and the current freeze time.
Entity effect object.
Add Insomnia
The add insomnia entity effect increases or decreases the amount of insomnia on the player. It has the following format:
tconstruct:add_insomnia
.
Always - Insomnia amount to add. May be negative.
Entity effect object.
Add Breath
The add breath entity effect increases or decreases the target’s air supply. It has the following format:
tconstruct:add_breath
.
Always - Breath to add to the target, will be scaled by the fluid level. May be negative.
Entity effect object.
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:
tconstruct:calcified
.
Always
Entity effect object.