[PR #2993] [MERGED] Honour more game rules and raise missing game events like vanilla #4744

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

📋 Pull Request Information

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

Base: main ← Head: fix/world-rules-parity


📝 Commits (8)

  • 1861c82 Make TNT, TNT minecarts and End crystal blasts honour the drop decay rules
  • bbe656e Use the monsters_burn window for sunlight burning
  • 0318c13 Let projectiles break chorus flowers and decorated pots
  • 465832b Honour global_sound_events for the wither, dragon and portal sounds
  • 98da8f8 Enforce max_command_forks in /execute
  • 158d99a Raise entity_mount and entity_dismount game events
  • 06fe3e8 Raise the bounce game event when a player bounces
  • 1a71386 Sculk: take each mob's vehicle from the tick's snapshot

📊 Changes

14 files changed (+193 additions, -28 deletions)

View changed files

📝 crates/horizon-client/examples/probe/mob_ai_probe.rs (+1 -0)
📝 crates/horizon-client/src/game.rs (+5 -3)
📝 crates/horizon-client/src/game/commands/execute.rs (+21 -1)
📝 crates/horizon-client/src/game/creatures.rs (+65 -7)
📝 crates/horizon-client/src/game/dragon.rs (+6 -3)
📝 crates/horizon-client/src/game/explosion.rs (+9 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+6 -0)
📝 crates/horizon-client/src/game/level_particles.rs (+6 -0)
📝 crates/horizon-client/src/game/minecarts.rs (+4 -4)
📝 crates/horizon-client/src/game/respawn_anchor.rs (+1 -5)
📝 crates/horizon-client/src/game/sculk.rs (+60 -2)
📝 crates/horizon-client/src/game/tnt.rs (+4 -2)
📝 crates/horizon-client/src/mobs.rs (+3 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+2 -1)

📄 Description

What and why

  • TNT and TNT minecarts used plain destruction whatever tnt_explosion_drop_decay said; End crystal blasts and the dragon respawn spikes ignored block_explosion_drop_decay. Both now pick decay or plain destruction from the rule.
  • Undead burned whenever the sky was dark enough, which also burned them in storms with a bright sky and in the End. They now burn only while the overworld monsters_burn window is on (tick 23460 to 12542), and never outside the overworld.
  • Arrows, snowballs, eggs, tridents, fireballs, wither skulls and wind charges now break chorus flowers and crack-and-break decorated pots, when projectiles_can_break_blocks is on and the shooter may break blocks (a player not in adventure mode, or no shooter). Mobs and adventure players never do.
  • The wither spawn roar, the dragon death roar and the End portal opening only sound everywhere when global_sound_events is on. With it off, nothing plays far away. The wither roar was a local sound before; it is now the same global event as the other two.
  • /execute now stops when a modifier would bring the number of sources to max_command_forks (65536 by default), with the command.forkLimit error unless a fork came earlier in the chain.
  • Riding a vehicle (boat, minecart, mob) and getting off it now raise entity_mount and entity_dismount, so sculk sensors and wardens hear it. They are derived from the vehicle a rider had last tick, so every way of mounting is covered, on the server thread too.
  • A slime block or bed bounce now raises the bounce game event for the player.

Not in this PR: instrument_play (open PR #2417), entity_action for the ravager, creaking and armadillo, forgive_dead_players, universal_anger, spectators_generate_chunks, limited_crafting, lock codes, End has_skylight, and border damage cadence.

Vanilla reference

  • ServerLevel.getDestroyType, PrimedTnt/AbstractMinecart explosions (TNT interaction); EndCrystal.java:102, DragonRespawnStage.java:64 (BLOCK interaction).
  • Mob.isSunBurnTick (Mob.java:526), data/minecraft/timeline/day.json gameplay/monsters_burn keyframes 12542 false, 23460 true.
  • ChorusFlowerBlock.onProjectileHit (:252), DecoratedPotBlock.onProjectileHit (:202), Projectile.mayInteract/mayBreak/canBreakBlockInAdventureMode (Projectile.java:206, 400-409), tag impact_projectiles.
  • ServerLevel.globalLevelEvent (:1124), WitherBoss.java:268, EnderDragon.java:560, EnderEyeItem.java:66, LevelEventHandler.globalLevelEvent (ids 1023, 1028, 1038 only there).
  • BuildContexts.java (ERROR_FORK_LIMIT_REACHED, the forkLimit check per modifier).
  • Entity.java:2533 (ENTITY_MOUNT), :2573 (ENTITY_DISMOUNT), :891 (BOUNCE).

Known limits

  • The projectile break does not check spawn protection (Player.mayInteract) or a world whose default game mode is adventure with a shooter-less projectile.
  • Only the player bounces raise bounce; mobs do not bounce in Horizon today.

Self-check

clippy and fmt pass for horizon-client and horizon-world. Not run in game.


🔄 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/2993 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/world-rules-parity` --- ### 📝 Commits (8) - [`1861c82`](https://github.com/horizon-rust/horizon/commit/1861c82434e6fb37174e363c57c32579779bd570) Make TNT, TNT minecarts and End crystal blasts honour the drop decay rules - [`bbe656e`](https://github.com/horizon-rust/horizon/commit/bbe656e4ce160ddab8e5cac56dcc54e70fd837e1) Use the monsters_burn window for sunlight burning - [`0318c13`](https://github.com/horizon-rust/horizon/commit/0318c132eb8f43e974dde4bf5e0b03ce6ad747e6) Let projectiles break chorus flowers and decorated pots - [`465832b`](https://github.com/horizon-rust/horizon/commit/465832b0e46d606f85f30fd50ae3d01c0f5e1a0d) Honour global_sound_events for the wither, dragon and portal sounds - [`98da8f8`](https://github.com/horizon-rust/horizon/commit/98da8f82b8dc352dac8ba94cf2ef446987942a2c) Enforce max_command_forks in /execute - [`158d99a`](https://github.com/horizon-rust/horizon/commit/158d99a528166eec8ad26a16b28522b7baecf16e) Raise entity_mount and entity_dismount game events - [`06fe3e8`](https://github.com/horizon-rust/horizon/commit/06fe3e8e691a74240ce5f50b04a7fb250faeadb1) Raise the bounce game event when a player bounces - [`1a71386`](https://github.com/horizon-rust/horizon/commit/1a71386829c656196e951a35fa9c5fba24a71899) Sculk: take each mob's vehicle from the tick's snapshot ### 📊 Changes **14 files changed** (+193 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/mob_ai_probe.rs` (+1 -0) 📝 `crates/horizon-client/src/game.rs` (+5 -3) 📝 `crates/horizon-client/src/game/commands/execute.rs` (+21 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+65 -7) 📝 `crates/horizon-client/src/game/dragon.rs` (+6 -3) 📝 `crates/horizon-client/src/game/explosion.rs` (+9 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+6 -0) 📝 `crates/horizon-client/src/game/level_particles.rs` (+6 -0) 📝 `crates/horizon-client/src/game/minecarts.rs` (+4 -4) 📝 `crates/horizon-client/src/game/respawn_anchor.rs` (+1 -5) 📝 `crates/horizon-client/src/game/sculk.rs` (+60 -2) 📝 `crates/horizon-client/src/game/tnt.rs` (+4 -2) 📝 `crates/horizon-client/src/mobs.rs` (+3 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+2 -1) </details> ### 📄 Description ## What and why - TNT and TNT minecarts used plain destruction whatever `tnt_explosion_drop_decay` said; End crystal blasts and the dragon respawn spikes ignored `block_explosion_drop_decay`. Both now pick decay or plain destruction from the rule. - Undead burned whenever the sky was dark enough, which also burned them in storms with a bright sky and in the End. They now burn only while the overworld `monsters_burn` window is on (tick 23460 to 12542), and never outside the overworld. - Arrows, snowballs, eggs, tridents, fireballs, wither skulls and wind charges now break chorus flowers and crack-and-break decorated pots, when `projectiles_can_break_blocks` is on and the shooter may break blocks (a player not in adventure mode, or no shooter). Mobs and adventure players never do. - The wither spawn roar, the dragon death roar and the End portal opening only sound everywhere when `global_sound_events` is on. With it off, nothing plays far away. The wither roar was a local sound before; it is now the same global event as the other two. - `/execute` now stops when a modifier would bring the number of sources to `max_command_forks` (65536 by default), with the `command.forkLimit` error unless a fork came earlier in the chain. - Riding a vehicle (boat, minecart, mob) and getting off it now raise `entity_mount` and `entity_dismount`, so sculk sensors and wardens hear it. They are derived from the vehicle a rider had last tick, so every way of mounting is covered, on the server thread too. - A slime block or bed bounce now raises the `bounce` game event for the player. Not in this PR: `instrument_play` (open PR #2417), `entity_action` for the ravager, creaking and armadillo, `forgive_dead_players`, `universal_anger`, `spectators_generate_chunks`, `limited_crafting`, lock codes, End `has_skylight`, and border damage cadence. ## Vanilla reference - `ServerLevel.getDestroyType`, `PrimedTnt`/`AbstractMinecart` explosions (TNT interaction); `EndCrystal.java:102`, `DragonRespawnStage.java:64` (BLOCK interaction). - `Mob.isSunBurnTick` (`Mob.java:526`), `data/minecraft/timeline/day.json` `gameplay/monsters_burn` keyframes 12542 false, 23460 true. - `ChorusFlowerBlock.onProjectileHit` (`:252`), `DecoratedPotBlock.onProjectileHit` (`:202`), `Projectile.mayInteract`/`mayBreak`/`canBreakBlockInAdventureMode` (`Projectile.java:206, 400-409`), tag `impact_projectiles`. - `ServerLevel.globalLevelEvent` (`:1124`), `WitherBoss.java:268`, `EnderDragon.java:560`, `EnderEyeItem.java:66`, `LevelEventHandler.globalLevelEvent` (ids 1023, 1028, 1038 only there). - `BuildContexts.java` (`ERROR_FORK_LIMIT_REACHED`, the `forkLimit` check per modifier). - `Entity.java:2533` (`ENTITY_MOUNT`), `:2573` (`ENTITY_DISMOUNT`), `:891` (`BOUNCE`). ## Known limits - The projectile break does not check spawn protection (`Player.mayInteract`) or a world whose default game mode is adventure with a shooter-less projectile. - Only the player bounces raise `bounce`; mobs do not bounce in Horizon today. ## Self-check clippy and fmt pass for horizon-client and horizon-world. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07: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#4744
No description provided.