Skip to main content

Module shapes

Module shapes 

Source
Expand description

VoxelShape collision operations.

Implements vanilla’s Shapes class methods for AABB-list based collision.

ConstantsΒ§

COLLISION_EPSILON πŸ”’

FunctionsΒ§

collide
Computes the maximum safe movement along an axis for an entity AABB through a list of obstacle shapes.
collide_single πŸ”’
cross_axes πŸ”’
face_shape_occludes
Checks whether two face occlusion shapes fully cover a block face.
join_is_not_empty
Tests if two shapes have a non-empty intersection (boolean AND operation).
merged_face_occludes
Checks if two voxel shapes fully occlude the face between them. Returns true if fluid/objects cannot pass through the face.
merged_offset_face_occludes
Checks if two position-offset voxel shapes fully occlude the face between them.
overlaps_for_collision πŸ”’
project_offset_shape_onto_grid πŸ”’
project_shape_onto_grid πŸ”’
translate_shape
Translates a VoxelShape (block-local AABB) to world coordinates.