[PR #2196] [MERGED] Axolotls dry out on land, squid squirt ink when a living entity hurts them #4094

Closed
opened 2026-11-03 04:14:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2196
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/axolotl-squid-water-rules


📝 Commits (4)

  • fd0cb00 Axolotls dry out on land, squid squirt ink when a living entity hurts them
  • 75f7029 Squid ink: draw the squirt's voice pitch even when silent
  • efd6c60 Axolotl air: refill only where it rains locally, not in deserts or snowy biomes
  • bb9b042 Axolotl rain: the biome's height-adjusted temperature

📊 Changes

8 files changed (+139 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/biome.rs (+24 -1)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+1 -0)
📝 crates/horizon-client/src/mobs.rs (+14 -1)
📝 crates/horizon-client/src/mobs/ai.rs (+31 -1)
📝 crates/horizon-client/src/mobs/aquatic.rs (+53 -0)
📝 crates/horizon-client/src/mobs/axolotl.rs (+2 -0)
📝 crates/horizon-client/src/mobs/world.rs (+13 -0)

📄 Description

What and why

Two water-mob rules were missing.

  • Axolotls dry out. An axolotl's air was topped up every tick, so one left on land lived forever. Now it follows vanilla: its air supply is 6000, it is filled while the axolotl is in water or rain, and otherwise it drops by 1 each tick. At -20 the air goes back to 0 and the axolotl takes 2 dry_out damage. A new DryOut damage kind carries that damage (it causes no knockback and no panic, as in vanilla's tags), and /damage ... dry_out now picks it. New axolotls start with 6000 air.
  • Squid squirt ink. A squid or glow squid hurt after a living entity hit it now plays its squirt sound and shoots 30 squid_ink (glow_squid_ink) particles from beneath its body, turned by its body rotation, with vanilla's offsets and speed.

The ink is drawn in the host's own frame only. Players joined to a server do not get the particles yet, because main has no helper that sends a mob's level particles to them. That belongs with the server-player particle work, not here.

Vanilla reference

  • Axolotl.baseTick and Axolotl.handleAirSupply: if (isAlive() && !isInWaterOrRain()) { setAirSupply(preTickAirSupply - 1); if (shouldTakeDrowningDamage()) { setAirSupply(0); hurtServer(dryOut(), 2.0F); } } else setAirSupply(getMaxAirSupply());, getMaxAirSupply() = 6000. It only runs when the axolotl has AI.
  • Entity.isInWaterOrRain, Entity.isInRain: rain at the block or at the top of the box.
  • LivingEntity.shouldTakeDrowningDamage: air at or below -20.
  • Squid.hurtServer: super.hurtServer(...) && getLastHurtByMob() != null then spawnInk().
  • Squid.spawnInk: sound, then 30 times a direction rotateVector(Vec3(rand*0.6-0.3, -1, rand*0.6-0.3)) scaled by (baby ? 0.1 : 0.3) + rand*2, sent with count 0 and speed 0.1; rotateVector is xRot(xBodyRotO) then yRot(-yBodyRotO). GlowSquid uses GLOW_SQUID_INK and its own squirt sound.
  • Damage type dry_out: in no_knockback, not in panic_causes.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2196 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/axolotl-squid-water-rules` --- ### 📝 Commits (4) - [`fd0cb00`](https://github.com/horizon-rust/horizon/commit/fd0cb002962ed5d1ae9488b913a4329f850532e1) Axolotls dry out on land, squid squirt ink when a living entity hurts them - [`75f7029`](https://github.com/horizon-rust/horizon/commit/75f7029d016b0ff1109f030d20c28471242ce5e1) Squid ink: draw the squirt's voice pitch even when silent - [`efd6c60`](https://github.com/horizon-rust/horizon/commit/efd6c60a272d20f69e498a48afe3e96a759cf164) Axolotl air: refill only where it rains locally, not in deserts or snowy biomes - [`bb9b042`](https://github.com/horizon-rust/horizon/commit/bb9b0424b44606cd7af0bb57e4610d24c0af2a68) Axolotl rain: the biome's height-adjusted temperature ### 📊 Changes **8 files changed** (+139 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/biome.rs` (+24 -1) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs.rs` (+14 -1) 📝 `crates/horizon-client/src/mobs/ai.rs` (+31 -1) 📝 `crates/horizon-client/src/mobs/aquatic.rs` (+53 -0) 📝 `crates/horizon-client/src/mobs/axolotl.rs` (+2 -0) 📝 `crates/horizon-client/src/mobs/world.rs` (+13 -0) </details> ### 📄 Description ## What and why Two water-mob rules were missing. - **Axolotls dry out.** An axolotl's air was topped up every tick, so one left on land lived forever. Now it follows vanilla: its air supply is 6000, it is filled while the axolotl is in water or rain, and otherwise it drops by 1 each tick. At -20 the air goes back to 0 and the axolotl takes 2 `dry_out` damage. A new `DryOut` damage kind carries that damage (it causes no knockback and no panic, as in vanilla's tags), and `/damage ... dry_out` now picks it. New axolotls start with 6000 air. - **Squid squirt ink.** A squid or glow squid hurt after a living entity hit it now plays its squirt sound and shoots 30 `squid_ink` (`glow_squid_ink`) particles from beneath its body, turned by its body rotation, with vanilla's offsets and speed. The ink is drawn in the host's own frame only. Players joined to a server do not get the particles yet, because main has no helper that sends a mob's level particles to them. That belongs with the server-player particle work, not here. ## Vanilla reference - `Axolotl.baseTick` and `Axolotl.handleAirSupply`: `if (isAlive() && !isInWaterOrRain()) { setAirSupply(preTickAirSupply - 1); if (shouldTakeDrowningDamage()) { setAirSupply(0); hurtServer(dryOut(), 2.0F); } } else setAirSupply(getMaxAirSupply());`, `getMaxAirSupply() = 6000`. It only runs when the axolotl has AI. - `Entity.isInWaterOrRain`, `Entity.isInRain`: rain at the block or at the top of the box. - `LivingEntity.shouldTakeDrowningDamage`: air at or below -20. - `Squid.hurtServer`: `super.hurtServer(...) && getLastHurtByMob() != null` then `spawnInk()`. - `Squid.spawnInk`: sound, then 30 times a direction `rotateVector(Vec3(rand*0.6-0.3, -1, rand*0.6-0.3))` scaled by `(baby ? 0.1 : 0.3) + rand*2`, sent with count 0 and speed 0.1; `rotateVector` is `xRot(xBodyRotO)` then `yRot(-yBodyRotO)`. `GlowSquid` uses `GLOW_SQUID_INK` and its own squirt sound. - Damage type `dry_out`: in `no_knockback`, not in `panic_causes`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4094
No description provided.