Skip to main content

steel_utils/
lib.rs

1//! # Steel Utils
2//!
3//! This crate contains a collection of utilities used by the Steel Minecraft server.
4
5#![feature(const_trait_impl, const_cmp, derive_const, array_try_from_fn)]
6
7pub mod axis;
8/// Vanilla `BlockUtil` helpers.
9pub mod block_util;
10/// Climate system for biome selection.
11pub mod climate;
12pub mod codec;
13/// Packed RGB and ARGB colors.
14pub mod color;
15/// Direction enum for the six cardinal directions.
16pub mod direction;
17/// Deterministic concrete-type downcasting for erased Steel objects.
18pub mod downcast;
19mod front_vec;
20/// Shared geometry primitives.
21pub mod geometry;
22/// CRC32C hashing for component validation.
23pub mod hash;
24/// Java standard-library compatibility helpers.
25pub mod java;
26/// A module for custom locks.
27pub mod locks;
28/// Utilities for Steel logging.
29pub mod logger;
30/// Vanilla `Mth` helpers.
31pub mod mth;
32/// Vanilla-compatible NBT helpers.
33pub mod nbt;
34pub mod random;
35/// helpful tools for registry
36pub mod registry;
37pub mod rotation;
38/// Data saving helpers
39pub mod saved_data;
40pub mod serial;
41pub mod text;
42pub mod threading;
43/// A module for common types.
44pub mod types;
45/// UUID extension trait for Minecraft NBT serialization.
46pub mod uuid_ext;
47/// Vanilla-compatible value provider types (`VerticalAnchor`,
48/// `HeightProvider`, `FloatProvider`).
49pub mod value_providers;
50
51#[rustfmt::skip]
52#[path = "generated/vanilla_translations/ids.rs"]
53#[expect(missing_docs, warnings)]
54pub mod translations;
55#[rustfmt::skip]
56#[path = "generated/vanilla_translations/registry.rs"]
57#[expect(missing_docs, warnings)]
58pub mod translations_registry;
59#[rustfmt::skip]
60#[path = "generated/entity_events.rs"]
61#[expect(missing_docs, warnings)]
62pub mod entity_events;
63#[rustfmt::skip]
64#[path = "generated/version.rs"]
65#[expect(missing_docs, warnings)]
66pub mod version;
67
68/// The Minecraft version this server supports.
69pub const MC_VERSION: &str = version::MINECRAFT_VERSION;
70
71pub use color::{ArgbColor, RgbColor};
72pub use direction::Direction;
73pub use downcast::{Downcast, DowncastType, DowncastTypeKey, ErasedType};
74pub use front_vec::FrontVec;
75pub use geometry::{BlockLocalAabb, BoundingBox, WorldAabb};
76pub use rotation::Rotation;
77pub use types::BlockPos;
78pub use types::BlockStateId;
79pub use types::ChunkPos;
80pub use types::GlobalPos;
81pub use types::Identifier;
82pub use types::PackedBlockPos;
83pub use types::PackedChunkLocalXZ;
84pub use types::PackedChunkPos;
85pub use types::PackedSectionBlockPos;
86pub use types::PackedSectionPos;
87pub use types::SectionPos;
88pub use uuid_ext::UuidExt;