Skip to main content

steel_core/behavior/blocks/vegetation/
nether_vines.rs

1use rand::{Rng, RngExt};
2
3pub(crate) fn get_blocks_to_grow_when_bonemealed(rng: &mut dyn Rng) -> i32 {
4    let mut grow_probability = 1.0;
5
6    let mut count = 0;
7
8    while rng.random::<f64>() < grow_probability {
9        grow_probability *= 0.826;
10        count += 1;
11    }
12    count
13}