Skip to main content

Module common

Module common 

Source
Expand description

Version-independent data types shared by every version module.

The generated per-version tables (crate::v1_8, crate::v1_16_5) are built from these types. Everything here is plain Copy data or &'static slices so the tables can live in static memory with no runtime initialisation.

Structs§

Aabb
Axis-aligned box in block-local coordinates (0.0..=1.0 for a full cube; some shapes such as fences or piston arms extend outside that range).
BiomeInfo
A biome.
BlockInfo
Static description of a block (cold data: names, digging, light, drops).
BlockPhysics
Physics properties of a block (vanilla facts that minecraft-data does not carry; maintained in codegen/data/src/facts.rs).
Collision
The collision of one block state.
Drop
A block’s item drop as listed by minecraft-data (no loot-table logic, no fortune).
EffectInfo
A status effect.
EnchantCost
Linear enchanting cost a * level + b.
EnchantmentInfo
An enchantment.
EntityDimensions
Vanilla entity dimensions (floats, as the game stores them).
EntityInfo
An entity type.
EntityVariant
One measured size variant of an entity type.
Fluid
A fluid occupying a block state.
FoodInfo
A food item.
ItemInfo
An item.
PhysicsFlags
Bit set of physics-relevant block flags.
SelectionShape
A block’s outline (selection) or interaction VoxelShape, block-local, as the crosshair ray tests it (1.14+ versions; oracle selection_shapes.jsonl.gz).
VanillaEntitySize
Vanilla sizes of one entity type, measured by the oracle on the client, spawned the way the client spawns it from its packet, then metadata-dependent variants applied like the client does (oracle/README.md, “entity_sizes.jsonl.gz”).

Enums§

BoundingBox
minecraft-data’s coarse bounding-box classification.
BreakTime
When a survival dig with a constant per-tick progress finishes.
DigMaterial
minecraft-data’s harvest “material” group: selects the tool speed multipliers (see the per-version tool_multiplier). This is NOT vanilla’s Material class.
EntityKind
Broad entity kind from minecraft-data.
FluidKind
Fluid kind of a block state.
NeighbourShape
Family of a neighbour-dependent shape. The world/physics crate implements the vanilla connection rules per family.
ShapeDependency
What a block’s collision shape depends on besides its own block state.
VariantApplied
When the vanilla client applies a size variant.
WorldCoord
How vanilla turns one bound of a collision box into an absolute world coordinate.

Functions§

break_time
The tick the client finishes the block, accumulating progress in f32 as MultiPlayerGameMode does: the start tick runs startDestroyBlock and then continueDestroyBlock, every later tick continueDestroyBlock. The first destroy_delay continue calls only count the delay down (5 after the client finished a block, else 0). limit bounds the search (vanilla has none).

Type Aliases§

WorldCoords
Per-bound world-coordinate rules of one box, in Aabb field order (min_x, min_y, min_z, max_x, max_y, max_z).