monolithium/
lib.rs

1pub use std::cmp::max;
2pub use std::cmp::min;
3pub use std::cmp::Ordering;
4pub use std::collections::HashSet;
5pub use std::collections::VecDeque;
6pub use std::hash::Hash;
7pub use std::hash::Hasher;
8pub use std::sync::Arc;
9pub use std::sync::mpsc;
10pub use std::sync::Mutex;
11pub use std::sync::OnceLock;
12pub use std::thread;
13
14pub use ahash::AHashSet;
15pub use clap::Parser;
16pub use clap::Subcommand;
17pub use indicatif::ParallelProgressIterator;
18pub use indicatif::ProgressBar;
19pub use indicatif::ProgressStyle;
20pub use rayon::prelude::*;
21pub use smart_default::SmartDefault;
22
23pub mod commands;
24pub mod monolith;
25pub mod perlin;
26pub mod rng;
27pub mod seeds;
28pub mod utils;
29pub mod world;
30pub use monolith::*;
31pub use perlin::*;
32pub use rng::JavaRNG;
33pub use seeds::*;
34pub use world::*;
35
36/// Coordinate at which the Far Lands start
37pub const FARLANDS: i64 = 12_550_824;
38
39/// Lateral size of the inbounds worlds within the Far Lands
40pub const WORLD_SIZE: i64 = 2*FARLANDS + 1;
41
42/// It was found experimentally that the perlin noise and
43/// monoliths wraps around every 2**23 blocks, drastically
44/// reducing the practical search space!
45pub const MONOLITHS_REPEAT: i64 = 2_i64.pow(23);
46
47/// Java uses a 48-bit Linear Congruential Generator for its RNG,
48/// which continuously masks the state's (1 << 48) - 1 lower bits,
49/// meaning there's effectively only 2**48 unique seeds!
50pub const TOTAL_SEEDS: u64 = 2_u64.pow(48);