[PR #3599] [MERGED] Let thrown pearls hit wind charges #5086

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3599
Author: @doodlyyousuf
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: fix/pearl-hits-wind-charge


📝 Commits (2)

  • ce45e06 Let thrown pearls hit wind charges
  • c74d170 rustfmt pearl and wind-charge boxes

📊 Changes

2 files changed (+102 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+60 -10)
📝 crates/horizon-client/src/projectiles.rs (+42 -0)

📄 Description

🤖 Opened by doodlyyousuf's AI agent (MonkeyCode), not by doodlyyousuf himself.

What and why

In vanilla 26.3, AbstractWindCharge is pickable, so a thrown ender pearl's ProjectileUtil.getEntityHitResult can hit it and ThrownEnderpearl.onHit teleports the thrower. Horizon only put mobs and players in the pearl's entity targets, so a pearl flew through a wind charge.

This adds each in-flight wind charge's entity box as a pearl target. The pearl still uses the existing teleport path (no speed change). The charge is not treated as a real mob, so it is not damaged.

Throw speeds (1.5 + ServerPlayer.getKnownMovement) are already correct on main and are not changed here.

Vanilla reference

  • net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.AbstractWindCharge (pickable)
  • net.minecraft.world.entity.projectile.ProjectileUtil.getEntityHitResult
  • net.minecraft.world.entity.projectile.throwableitemprojectile.ThrownEnderpearl.onHit
  • net.minecraft.world.item.EnderpearlItem.use / WindChargeItem.use (unchanged: shootFromRotation 1.5 / 1.0)

Checked against the 26.3 client jar. No new Java harness; ender_pearl_hits_a_wind_charge_box covers the ray vs charge box.

Self-check

Could not run python3 tools/pr_ready.py here (no Rust toolchain on PATH). Please treat CI as the check: cargo test -p horizon-client --lib projectiles::tests::ender_pearl_hits_a_wind_charge_box.


🔄 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/3599 **Author:** [@doodlyyousuf](https://github.com/doodlyyousuf) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/pearl-hits-wind-charge` --- ### 📝 Commits (2) - [`ce45e06`](https://github.com/horizon-rust/horizon/commit/ce45e065c3be422d14f984dcf270abb743d6faa4) Let thrown pearls hit wind charges - [`c74d170`](https://github.com/horizon-rust/horizon/commit/c74d170fbcf3696ffdf2b64106635bab318536e4) rustfmt pearl and wind-charge boxes ### 📊 Changes **2 files changed** (+102 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+60 -10) 📝 `crates/horizon-client/src/projectiles.rs` (+42 -0) </details> ### 📄 Description > 🤖 Opened by doodlyyousuf's AI agent (MonkeyCode), not by doodlyyousuf himself. ## What and why In vanilla 26.3, `AbstractWindCharge` is pickable, so a thrown ender pearl's `ProjectileUtil.getEntityHitResult` can hit it and `ThrownEnderpearl.onHit` teleports the thrower. Horizon only put mobs and players in the pearl's entity targets, so a pearl flew through a wind charge. This adds each in-flight wind charge's entity box as a pearl target. The pearl still uses the existing teleport path (no speed change). The charge is not treated as a real mob, so it is not damaged. Throw speeds (1.5 + `ServerPlayer.getKnownMovement`) are already correct on main and are not changed here. ## Vanilla reference - `net.minecraft.world.entity.projectile.hurtingprojectile.windcharge.AbstractWindCharge` (pickable) - `net.minecraft.world.entity.projectile.ProjectileUtil.getEntityHitResult` - `net.minecraft.world.entity.projectile.throwableitemprojectile.ThrownEnderpearl.onHit` - `net.minecraft.world.item.EnderpearlItem.use` / `WindChargeItem.use` (unchanged: `shootFromRotation` 1.5 / 1.0) Checked against the 26.3 client jar. No new Java harness; `ender_pearl_hits_a_wind_charge_box` covers the ray vs charge box. ## Self-check Could not run `python3 tools/pr_ready.py` here (no Rust toolchain on PATH). Please treat CI as the check: `cargo test -p horizon-client --lib projectiles::tests::ender_pearl_hits_a_wind_charge_box`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:08 +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#5086
No description provided.