Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

Merge pull request #6581 from xFedeT/feat/native-state-block

Ludovic Mariede8dc9e86c5d
diff --cc crates/horizon-client/src/game/native_hooks.rs
index eecfb999c,e169f195d..1e77cdcbe
--- a/crates/horizon-client/src/game/native_hooks.rs
+++ b/crates/horizon-client/src/game/native_hooks.rs
@@@ -869,13 -773,12 +869,14 @@@ impl GameLevel<'_>
/// the clicked position, whether the clicked block is being replaced, the
/// item in hand) and `fluid` the fluid in the position the block would go
/// in, which a waterlogged block reads. Build the state from `state` with
- /// `native_state_with_property`. It is asked for every placer that goes
+ /// `native_state_with_property`, and know whether `state` is yours with
+ /// `native_state_block`. It is asked for every placer that goes
/// through vanilla's placement (a player's `BlockItem.place`, a
/// dispenser's `DirectionalPlaceContext`), and the answer still takes its
- /// survival and entity obstruction checks. Authoritative servers only.
- /// 76.
+ /// survival and entity obstruction checks. A trait mod returns
+ /// `Some(Some(state))` to choose a state, `Some(None)` to refuse, or
+ /// `None` to leave the answer to the next mod or vanilla.
+ /// Authoritative servers only. 76.
#[inline(always)]
#[allow(clippy::option_option)]
pub(super) fn native_state_for_placement(