[PR #2346] [MERGED] Let a brush dust suspicious sand and gravel #4225

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

📋 Pull Request Information

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

Base: main ← Head: fix/brush-suspicious-blocks


📝 Commits (3)

  • 4084bcd Let a brush dust suspicious sand and gravel
  • 4de85f0 Merge remote-tracking branch 'origin/main' into HEAD
  • 854bcb1 random_tick probe: a fresh suspicious block's reset check changes nothing

📊 Changes

8 files changed (+325 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+25 -0)
➕ crates/horizon-client/src/game/brush.rs (+246 -0)
📝 crates/horizon-client/src/game/item_draw.rs (+3 -2)
📝 crates/horizon-client/src/game/lan.rs (+5 -4)
📝 crates/horizon-client/src/game/remote.rs (+33 -0)
📝 crates/horizon-world/examples/probe/block_update_fixture.rs (+4 -2)
📝 crates/horizon-world/src/level/mod.rs (+2 -1)
📝 crates/horizon-world/src/level/tick.rs (+7 -0)

📄 Description

What and why

Holding a brush on suspicious sand or gravel did nothing: no dust, no sound, no loot. The brush also used the 72000 tick use time of a bow in the item model.

Now a brush aimed at a block starts being used (200 ticks, restarted while the button is held). Every 10 ticks, at tick 5, it plays the brush sound and shows dust. On suspicious sand or gravel each stroke is counted by the block, 10 ticks apart. The block gets dustier at 1, 3 and 6 strokes. After 10 strokes the loot table rolls, the item drops out of the brushed face, and the block turns into sand or gravel with its completion sound and break particles. Each counted stroke that finishes the block wears the brush by 1. A block left alone loses 2 strokes every 4 ticks (the scheduled tick now reaches the game).

The counts are not saved, like in vanilla. The loot table and seed stay in the saved block entity (as for decorated pots) and roll on the first counted stroke. The server runs the strokes, so it works for guests and for the in-process server. The window client starts the use itself so letting go sends the release, and shows its own dust.

Not done: the item floating in the block while brushing (rendering), the loot luck of the player, the generate_loot advancement trigger, and a mob standing in front of the block ending the use.

Vanilla reference

  • BrushItem.useOn, onUseTick, spawnDustParticles, USE_DURATION
  • BrushableBlockEntity.brush, unpackLootTable, brushingCompleted, dropContent, checkReset, getCompletionState
  • BrushableBlock.tick and getBrushSound / getBrushCompletedSound
  • LevelEventHandler event 3008

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/2346 **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/brush-suspicious-blocks` --- ### 📝 Commits (3) - [`4084bcd`](https://github.com/horizon-rust/horizon/commit/4084bcdf753c4e1c517ea1667b632016cfc7b110) Let a brush dust suspicious sand and gravel - [`4de85f0`](https://github.com/horizon-rust/horizon/commit/4de85f000dfcbd90db39cea3f82c462d25a6bd9f) Merge remote-tracking branch 'origin/main' into HEAD - [`854bcb1`](https://github.com/horizon-rust/horizon/commit/854bcb158f78d8af9c6cfea262603bca6ad5c245) random_tick probe: a fresh suspicious block's reset check changes nothing ### 📊 Changes **8 files changed** (+325 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+25 -0) ➕ `crates/horizon-client/src/game/brush.rs` (+246 -0) 📝 `crates/horizon-client/src/game/item_draw.rs` (+3 -2) 📝 `crates/horizon-client/src/game/lan.rs` (+5 -4) 📝 `crates/horizon-client/src/game/remote.rs` (+33 -0) 📝 `crates/horizon-world/examples/probe/block_update_fixture.rs` (+4 -2) 📝 `crates/horizon-world/src/level/mod.rs` (+2 -1) 📝 `crates/horizon-world/src/level/tick.rs` (+7 -0) </details> ### 📄 Description ## What and why Holding a brush on suspicious sand or gravel did nothing: no dust, no sound, no loot. The brush also used the 72000 tick use time of a bow in the item model. Now a brush aimed at a block starts being used (200 ticks, restarted while the button is held). Every 10 ticks, at tick 5, it plays the brush sound and shows dust. On suspicious sand or gravel each stroke is counted by the block, 10 ticks apart. The block gets dustier at 1, 3 and 6 strokes. After 10 strokes the loot table rolls, the item drops out of the brushed face, and the block turns into sand or gravel with its completion sound and break particles. Each counted stroke that finishes the block wears the brush by 1. A block left alone loses 2 strokes every 4 ticks (the scheduled tick now reaches the game). The counts are not saved, like in vanilla. The loot table and seed stay in the saved block entity (as for decorated pots) and roll on the first counted stroke. The server runs the strokes, so it works for guests and for the in-process server. The window client starts the use itself so letting go sends the release, and shows its own dust. Not done: the item floating in the block while brushing (rendering), the loot luck of the player, the `generate_loot` advancement trigger, and a mob standing in front of the block ending the use. ## Vanilla reference - `BrushItem.useOn`, `onUseTick`, `spawnDustParticles`, `USE_DURATION` - `BrushableBlockEntity.brush`, `unpackLootTable`, `brushingCompleted`, `dropContent`, `checkReset`, `getCompletionState` - `BrushableBlock.tick` and `getBrushSound` / `getBrushCompletedSound` - `LevelEventHandler` event 3008 ## 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: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#4225
No description provided.