[PR #2324] [MERGED] Let mobs, dropped items and projectiles trigger pressure plates and tripwires #4205

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

📋 Pull Request Information

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

Base: main ← Head: fix/plates-mobs-items


📝 Commits (2)

  • bf508c2 Let mobs, dropped items and projectiles trigger pressure plates and tripwires
  • 1bddc39 Merge main into fix/plates-mobs-items

📊 Changes

2 files changed (+104 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+87 -6)
📝 crates/horizon-client/src/projectiles.rs (+17 -0)

📄 Description

What and why

Only players and minecarts could press pressure plates or trip a tripwire. A zombie walking over a stone plate, an item dropped on a wooden plate, or an arrow flying through a tripwire did nothing.

The count behind plates and tripwires only looked at the host player, LAN guests and minecarts, and the per-tick scan for "entity inside this block" only started from the same boxes. Now both also use:

  • mobs (everything living except bats), which is all a stone plate counts;
  • for wooden/weighted plates and tripwires also boats, end crystals, primed TNT, falling blocks, dropped items, experience orbs and projectiles (arrows and the rest, with their real box sizes).

This runs where the entities live (the server thread, or the in-frame game), and only entities whose box overlaps the plate or tripwire area are counted. Armor stands are not in the mob list, so they are skipped as in vanilla.

Vanilla reference

  • BasePressurePlateBlock.getEntityCount (NO_SPECTATORS and not isIgnoringBlockTriggers) and entityInside
  • PressurePlateBlock.getSignalStrength (EVERYTHING = Entity, MOBS = LivingEntity)
  • WeightedPressurePlateBlock.getSignalStrength (counts all entities, capped at max weight)
  • TripWireBlock.entityInside / checkPressed
  • Entity.isIgnoringBlockTriggers (overridden by Bat, ArmorStand, Marker, Display, Interaction, OminousItemSpawner)
  • Box sizes from EntityTypes (arrow 0.5, snowball/egg/pearl/potion/llama spit 0.25, small fireball/wither skull/wind charges/shulker bullet 0.3125, fireball 1.0, experience orb 0.5)

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/2324 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/plates-mobs-items` --- ### 📝 Commits (2) - [`bf508c2`](https://github.com/horizon-rust/horizon/commit/bf508c2842825c09abb986261342f53e38953af7) Let mobs, dropped items and projectiles trigger pressure plates and tripwires - [`1bddc39`](https://github.com/horizon-rust/horizon/commit/1bddc392b2b9c18139e99718a68170bb38be6b03) Merge main into fix/plates-mobs-items ### 📊 Changes **2 files changed** (+104 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+87 -6) 📝 `crates/horizon-client/src/projectiles.rs` (+17 -0) </details> ### 📄 Description ## What and why Only players and minecarts could press pressure plates or trip a tripwire. A zombie walking over a stone plate, an item dropped on a wooden plate, or an arrow flying through a tripwire did nothing. The count behind plates and tripwires only looked at the host player, LAN guests and minecarts, and the per-tick scan for "entity inside this block" only started from the same boxes. Now both also use: - mobs (everything living except bats), which is all a stone plate counts; - for wooden/weighted plates and tripwires also boats, end crystals, primed TNT, falling blocks, dropped items, experience orbs and projectiles (arrows and the rest, with their real box sizes). This runs where the entities live (the server thread, or the in-frame game), and only entities whose box overlaps the plate or tripwire area are counted. Armor stands are not in the mob list, so they are skipped as in vanilla. ## Vanilla reference - `BasePressurePlateBlock.getEntityCount` (NO_SPECTATORS and not `isIgnoringBlockTriggers`) and `entityInside` - `PressurePlateBlock.getSignalStrength` (EVERYTHING = `Entity`, MOBS = `LivingEntity`) - `WeightedPressurePlateBlock.getSignalStrength` (counts all entities, capped at max weight) - `TripWireBlock.entityInside` / `checkPressed` - `Entity.isIgnoringBlockTriggers` (overridden by Bat, ArmorStand, Marker, Display, Interaction, OminousItemSpawner) - Box sizes from `EntityTypes` (arrow 0.5, snowball/egg/pearl/potion/llama spit 0.25, small fireball/wither skull/wind charges/shulker bullet 0.3125, fireball 1.0, experience orb 0.5) ## 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:15:28 +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#4205
No description provided.