Water Protection
Water Protection is an armour enchantment Origins adds for the origins that take damage in water, the Enderian and the Blazeborn. It goes on any enchantable armour piece, up to level IV, and it can't be combined with Protection, Blast Protection, Fire Protection or Projectile Protection.
Enchantment ID: origins:water_protection
| Property | Value |
|---|---|
| Slots | Armour (helmet, chestplate, leggings, boots) |
| Max level | 4 per piece, and the levels of the four pieces are added together |
| Weight | 2, as rare as Blast Protection |
| Obtainable from | The enchanting table, villager trades and enchanted books in loot |
| Exclusive with | #minecraft:exclusive_set/armor (the vanilla Protections) |
What it does
It buys time and nothing else. Each combined level across the four armour pieces adds 6 ticks (0.3 seconds) to the gap between hits, up to 8 levels:
| Combined level | Gap between hits | Time to lose 20 health (10 hearts) |
|---|---|---|
| 0 | 20 ticks (1 s) | about 10 s |
| 2 | 32 ticks (1.6 s) | about 16 s |
| 4 | 44 ticks (2.2 s) | about 22 s |
| 6 | 56 ticks (2.8 s) | about 28 s |
| 8 or more | 68 ticks (3.4 s) | about 34 s |
Every hit is a flat 2 damage (1 heart) at every level. The enchantment doesn't soften it: origins:hurt_by_water is in #minecraft:bypasses_armor, #minecraft:bypasses_shield and #minecraft:bypasses_enchantments, so armour points, a shield, plain Protection and Water Protection itself all leave the number alone.
The first hit lands on the tick you touch water. The gap is the delay before the next hit, and there is no grace period before the first. The clock keeps running while you are dry, so two seconds on land take two seconds off the next gap, and stepping in and out of a pool doesn't reset it.
The cap at 8 means two pieces of Water Protection IV already buy the whole 3.4 seconds, which leaves the other two slots free for Protection against everything else. No level makes you immune.
Conduit Power does. While minecraft:conduit_power is active, water and rain stop hurting entirely. A conduit stays where you build it, so it makes a base safe without following you around.
Where the numbers live
All of it is one origins:water_vulnerability power, an apoli:multiple holding three parts, and every number in it can be changed:
{
"type": "apoli:multiple",
"damage": {
"type": "apoli:action_over_time",
"entity_action": {
"type": "apoli:and",
"actions": [
{
"type": "apoli:change_resource",
"resource": "*:*_water_prot_level",
"operation": "set",
"change": "min(enchantment[origins:water_protection, armor, sum], 8) * 6 + 20"
},
{
"type": "apoli:trigger_cooldown",
"power": "*:*_interval"
},
{
"type": "apoli:damage",
"amount": 2,
"damage_type": "origins:hurt_by_water"
}
]
},
"interval": 1,
"condition": {
"type": "apoli:all_of",
"conditions": [
{
"type": "apoli:resource",
"resource": "*:*_interval",
"comparison": "==",
"compare_to": 0
},
{
"inverted": true,
"type": "apoli:status_effect",
"effect": "minecraft:conduit_power"
},
{
"type": "apoli:any_of",
"conditions": [
{
"type": "apoli:fluid_height",
"fluid": "minecraft:water",
"comparison": ">",
"compare_to": 0
},
{
"type": "apoli:in_rain"
}
]
}
]
}
},
"interval": {
"type": "apoli:cooldown",
"cooldown": "*:*_water_prot_level",
"hud_render": {
"should_render": false
}
},
"water_prot_level": {
"type": "apoli:resource",
"enforce_limits": false,
"retain_value": true,
"hud_render": {
"should_render": false
}
}
}water_prot_levelis scratch space: an apoli:resource holding the length of the next gap, in ticks. Its Expression is where the balance lives.20is the bare gap,6is what one combined level is worth, and8is where extra levels stop counting.intervalis an apoli:cooldown that reads its length from that resource, so each hit sets the delay before the next one from the armour you were wearing when it landed. It keeps counting down out of the water.damageis checked every tick and runs when the cooldown has run out, you are in water or rain, and you don't have Conduit Power. A fresh cooldown starts at0, which is why the first hit is immediate. The order inside theapoli:andmatters: the level is written first, the cooldown is started from it second, and the damage lands last.
Swap the apoli:status_effect condition for something else to move the immunity, or delete it to take immunity away. Raise 8 to make high levels keep paying off, or use an expression in amount to trade the delay for a softer hit.
The enchantment has no effects of its own. It is a marker that the power reads, which keeps the whole mechanic in one file.