diff --git a/crates/horizon-client/src/lan/guest.rs b/crates/horizon-client/src/lan/guest.rs index 652aec57e..84e768879 100644 --- a/crates/horizon-client/src/lan/guest.rs +++ b/crates/horizon-client/src/lan/guest.rs @@ -363,6 +363,11 @@ impl Guest { pub fn send(&self, packet: &play::Clientbound) { self.sender.send(packet.encode()); } + pub fn send_all(&self, packets: &[play::Clientbound]) { + for p in packets { + self.send(p); + } + } pub fn chunk(&self) -> (i32, i32) { ( (self.position[0].floor() as i32) >> 4, diff --git a/crates/horizon-world/src/level/bonemeal.rs b/crates/horizon-world/src/level/bonemeal.rs index ef52ca625..274512138 100644 --- a/crates/horizon-world/src/level/bonemeal.rs +++ b/crates/horizon-world/src/level/bonemeal.rs @@ -160,6 +160,16 @@ impl Behaviours { ) -> bool { self.sim(level, ticks).grow_water_plant(pos, face) } + /// The `BonemealableBlock.Type` particle spread of a block at level event + /// 1505: Some(true) for `NEIGHBOR_SPREADER` (particles over a 3-block + /// area above), Some(false) for `GROWER`, None when not bonemealable. + pub fn bone_meal_spreads(&self, state: BlockStateId) -> Option { + let kind = self.bonemeal_kind(state)?; + Some(matches!( + kind, + Kind::Grass | Kind::Nylium | Kind::Netherrack | Kind::FeaturePlacer + )) + } fn bonemeal_kind(&self, state: BlockStateId) -> Option { let data = self.data(state); if !data.implements(Interface::Bonemealable) {