Trait StructureRandom
pub trait StructureRandom {
// Required methods
fn next_int_bound(&mut self, bound: i32) -> i32;
fn next_long(&mut self) -> i64;
fn next_float(&mut self) -> f32;
fn next_double(&mut self) -> f64;
fn next_boolean(&mut self) -> bool;
}Expand description
The random a structure type or piece draws from, in vanilla’s order: the
chunk’s WorldgenRandom for a start, the piece’s RandomSource for a piece.
Required Methods§
fn next_int_bound(&mut self, bound: i32) -> i32
fn next_int_bound(&mut self, bound: i32) -> i32
nextInt(bound); 0 for a bound below 1.
fn next_float(&mut self) -> f32
fn next_float(&mut self) -> f32
nextFloat.
fn next_double(&mut self) -> f64
fn next_double(&mut self) -> f64
nextDouble.
fn next_boolean(&mut self) -> bool
fn next_boolean(&mut self) -> bool
nextBoolean.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".