[GH-ISSUE #5486] Native mods: a mod block decides if it can stay where it is #1693

Closed
opened 2026-11-02 15:48:59 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @reservedbytes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5486

Part of #4953

A mod block can't answer vanilla's BlockBehaviour.canSurvive, or mayPlaceOn for plants
So a mod plant can't say which blocks it grows on, or pop off when the block under it goes
Vanilla asks canSurvive when a block is placed and again from updateShape when a neighbour changes; the shape update hook (#4899) covers the second call, not the rule itself

What's missing

  • a hook where a mod block answers canSurvive for a position, asked on placement and from the shape update
  • the plant side: mayPlaceOn, so a crop names the blocks it can sit on
Originally created by @reservedbytes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5486 Part of #4953 A mod block can't answer vanilla's `BlockBehaviour.canSurvive`, or `mayPlaceOn` for plants So a mod plant can't say which blocks it grows on, or pop off when the block under it goes Vanilla asks `canSurvive` when a block is placed and again from `updateShape` when a neighbour changes; the shape update hook (#4899) covers the second call, not the rule itself What's missing - a hook where a mod block answers `canSurvive` for a position, asked on placement and from the shape update - the plant side: `mayPlaceOn`, so a crop names the blocks it can sit on
Author
Owner

@CocofireHD commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

Claiming to work on this. I will open a pull request with the fix and keep this issue updated.

<!-- gh-comment-id:6548978231 --> @CocofireHD commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim Claiming to work on this. I will open a pull request with the fix and keep this issue updated.
Author
Owner

@kira-horizon[bot] commented on GitHub (Oct 31, 2026):

Claimed by PzmuV1517 on Discord (GitHub: PzmuV1517), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #5486).

<!-- gh-comment-id:6548981182 --> @kira-horizon[bot] commented on GitHub (Oct 31, 2026): Claimed by `PzmuV1517` on Discord (GitHub: `PzmuV1517`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #5486). <!-- kira:work -->
Author
Owner

@github-actions[bot] commented on GitHub (Oct 31, 2026):

🤖 Claims: refused, someone claimed this issue on Discord (Kira's in progress label): pick another, or ask in the thread. (asked by @CocofireHD)

<!-- gh-comment-id:6548981347 --> @github-actions[bot] commented on GitHub (Oct 31, 2026): 🤖 Claims: refused, someone claimed this issue on Discord (Kira's `in progress` label): pick another, or ask in the thread. (asked by @CocofireHD)
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#1693
No description provided.