[PR #2990] [MERGED] Items and damage parity: arrow and potion effects, mob damage sources, adventure can_break and can_place_on, lily pads on water, mud from water bottles #4742

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2990
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/item-damage-parity


📝 Commits (10+)

  • e204d3c Drink a potion's custom effects at its duration scale
  • ac22c4d Apply tipped and spectral arrow effects to the mobs they hit
  • 1b0b0a8 Hurt crowded mobs with cramming damage
  • 0e18c68 Hurt mobs with the lightning_bolt damage type
  • 08947cd Burn mobs standing in a lit campfire
  • c20247d Hurt mobs walking on magma blocks
  • d5ae994 Honour can_break and can_place_on in adventure mode
  • ae43424 Place lily pads and frogspawn on the water aimed at
  • 295871f Turn dirt to mud with a water bottle
  • eea99bb Fix clippy

📊 Changes

17 files changed (+417 additions, -40 deletions)

View changed files

📝 crates/horizon-client-render/src/brewing.rs (+16 -0)
📝 crates/horizon-client-render/src/effects.rs (+29 -10)
📝 crates/horizon-client/src/game.rs (+41 -8)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+2 -1)
📝 crates/horizon-client/src/game/creatures.rs (+10 -12)
📝 crates/horizon-client/src/game/game_mode.rs (+99 -0)
📝 crates/horizon-client/src/game/hand.rs (+2 -2)
📝 crates/horizon-client/src/game/lan_actions.rs (+1 -1)
📝 crates/horizon-client/src/game/potions.rs (+126 -1)
📝 crates/horizon-client/src/mobs.rs (+4 -0)
📝 crates/horizon-client/src/mobs/ai.rs (+12 -0)
📝 crates/horizon-client/src/mobs/armadillo.rs (+6 -1)
📝 crates/horizon-client/src/mobs/gear.rs (+1 -0)
📝 crates/horizon-client/src/mobs/panda.rs (+6 -1)
📝 crates/horizon-client/src/mobs/polar_bear.rs (+6 -1)
📝 crates/horizon-client/src/mobs/sulfur_cube.rs (+1 -0)
📝 crates/horizon-items/src/item_data.rs (+55 -2)

📄 Description

What and why

  • A potion's custom_effects and custom_color were dropped when a stack loaded, and drinking always used duration scale 1. They are kept and potion_duration_scale applies.
  • Tipped and spectral arrows from bows and crossbows carried no effect, and mobs never received one. They now carry the effect and apply it to the mobs they hit.
  • Crowded mobs rolled for cramming but were never hurt. They take 6 cramming damage.
  • Lightning hurt mobs as generic damage, which skipped the lightning loot condition (a struck turtle dropped no bowl). It now uses lightning_bolt.
  • Mobs in a lit campfire and on magma blocks took no damage. They now do.
  • Adventure players could never place or break, even with can_break or can_place_on on the held item. The components are checked.
  • Lily pads and frogspawn could not be placed on the water aimed at.
  • Right-clicking a water bottle on dirt started a drink. It now makes mud.

Vanilla reference

  • PotionContents.java (onConsume, custom_effects, potion_duration_scale).
  • Arrow.java and SpectralArrow.java (doPostHurtEffects).
  • LivingEntity.java:3340-3355 (pushEntities, cramming).
  • Entity.java thunderHit and damage_type/lightning_bolt.json.
  • CampfireBlock.entityInside, MagmaBlock.stepOn.
  • Player.blockActionRestricted, ItemStack.useOn, AdventureModePredicate.java.
  • PlaceOnWaterBlockItem.use.
  • PotionItem.useOn.

Not in this PR

  • Armour stands hurt by arrows, tridents, fireballs and explosions, and straw bed destroy_on_leave: deferred.
  • Creative-slot component work (#2945) and dyed leather (#2880, #2851): open PRs.
  • Goat horns (#2417): open PR.

Self-check

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

Fixes #3222


🔄 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/2990 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/item-damage-parity` --- ### 📝 Commits (10+) - [`e204d3c`](https://github.com/horizon-rust/horizon/commit/e204d3c028022e70f31a01f5093ef2e5c12bcfba) Drink a potion's custom effects at its duration scale - [`ac22c4d`](https://github.com/horizon-rust/horizon/commit/ac22c4db044e386df1116c4dd11c556eef408f57) Apply tipped and spectral arrow effects to the mobs they hit - [`1b0b0a8`](https://github.com/horizon-rust/horizon/commit/1b0b0a814953d836ba35b46d6b000fe6585fd001) Hurt crowded mobs with cramming damage - [`0e18c68`](https://github.com/horizon-rust/horizon/commit/0e18c68b4d5c3c98beb097e10f8b26843eec270e) Hurt mobs with the lightning_bolt damage type - [`08947cd`](https://github.com/horizon-rust/horizon/commit/08947cd9223cc31a93e1fcb7e955ab9ca393c230) Burn mobs standing in a lit campfire - [`c20247d`](https://github.com/horizon-rust/horizon/commit/c20247d708eeebd29565ec9ce864e898183e2f76) Hurt mobs walking on magma blocks - [`d5ae994`](https://github.com/horizon-rust/horizon/commit/d5ae9945faaa03d08c92f615bcd64616b501b92d) Honour can_break and can_place_on in adventure mode - [`ae43424`](https://github.com/horizon-rust/horizon/commit/ae43424882b3a34a845989d4c7ba5d3b9c4150d3) Place lily pads and frogspawn on the water aimed at - [`295871f`](https://github.com/horizon-rust/horizon/commit/295871fcab9e5b9b0d8b3315c928430592d411c0) Turn dirt to mud with a water bottle - [`eea99bb`](https://github.com/horizon-rust/horizon/commit/eea99bb586f10385f8d3929fe2dd770a8c23f567) Fix clippy ### 📊 Changes **17 files changed** (+417 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/brewing.rs` (+16 -0) 📝 `crates/horizon-client-render/src/effects.rs` (+29 -10) 📝 `crates/horizon-client/src/game.rs` (+41 -8) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+2 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+10 -12) 📝 `crates/horizon-client/src/game/game_mode.rs` (+99 -0) 📝 `crates/horizon-client/src/game/hand.rs` (+2 -2) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+1 -1) 📝 `crates/horizon-client/src/game/potions.rs` (+126 -1) 📝 `crates/horizon-client/src/mobs.rs` (+4 -0) 📝 `crates/horizon-client/src/mobs/ai.rs` (+12 -0) 📝 `crates/horizon-client/src/mobs/armadillo.rs` (+6 -1) 📝 `crates/horizon-client/src/mobs/gear.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/panda.rs` (+6 -1) 📝 `crates/horizon-client/src/mobs/polar_bear.rs` (+6 -1) 📝 `crates/horizon-client/src/mobs/sulfur_cube.rs` (+1 -0) 📝 `crates/horizon-items/src/item_data.rs` (+55 -2) </details> ### 📄 Description ## What and why - A potion's `custom_effects` and `custom_color` were dropped when a stack loaded, and drinking always used duration scale 1. They are kept and `potion_duration_scale` applies. - Tipped and spectral arrows from bows and crossbows carried no effect, and mobs never received one. They now carry the effect and apply it to the mobs they hit. - Crowded mobs rolled for cramming but were never hurt. They take 6 cramming damage. - Lightning hurt mobs as generic damage, which skipped the lightning loot condition (a struck turtle dropped no bowl). It now uses `lightning_bolt`. - Mobs in a lit campfire and on magma blocks took no damage. They now do. - Adventure players could never place or break, even with `can_break` or `can_place_on` on the held item. The components are checked. - Lily pads and frogspawn could not be placed on the water aimed at. - Right-clicking a water bottle on dirt started a drink. It now makes mud. ## Vanilla reference - `PotionContents.java` (`onConsume`, `custom_effects`, `potion_duration_scale`). - `Arrow.java` and `SpectralArrow.java` (`doPostHurtEffects`). - `LivingEntity.java:3340-3355` (`pushEntities`, cramming). - `Entity.java` `thunderHit` and `damage_type/lightning_bolt.json`. - `CampfireBlock.entityInside`, `MagmaBlock.stepOn`. - `Player.blockActionRestricted`, `ItemStack.useOn`, `AdventureModePredicate.java`. - `PlaceOnWaterBlockItem.use`. - `PotionItem.useOn`. ## Not in this PR - Armour stands hurt by arrows, tridents, fireballs and explosions, and straw bed `destroy_on_leave`: deferred. - Creative-slot component work (#2945) and dyed leather (#2880, #2851): open PRs. - Goat horns (#2417): open PR. ## Self-check clippy and fmt pass for horizon-client. Not run in game. Fixes #3222 --- <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:36 +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#4742
No description provided.