Struct BlockPos
pub struct BlockPos {
pub x: i32,
pub y: i32,
pub z: i32,
}Fields§
§x: i32§y: i32§z: i32Implementations§
§impl BlockPos
impl BlockPos
pub fn containing(point: Vec3) -> BlockPos
pub fn between_closed( a: BlockPos, b: BlockPos, ) -> Result<BlockBoxIter, BlockIterationTooLarge>
pub fn between_closed_box( b: Aabb, ) -> Result<BlockBoxIter, BlockIterationTooLarge>
pub fn between_corners_in_direction( a: BlockPos, b: BlockPos, direction: Vec3, ) -> Result<BlockBoxIter, BlockIterationTooLarge>
pub fn between_box_corners_in_direction( b: Aabb, direction: Vec3, ) -> Result<BlockBoxIter, BlockIterationTooLarge>
§impl BlockPos
impl BlockPos
pub const fn new(x: i32, y: i32, z: i32) -> BlockPos
pub const fn pack(self) -> i64
pub const fn pack(self) -> i64
Values outside the signed 26/12/26-bit ranges are truncated as in vanilla.
pub const fn unpack(value: i64) -> BlockPos
pub const fn offset(self, dx: i32, dy: i32, dz: i32) -> BlockPos
pub const fn section(self) -> SectionPos
pub const fn chunk(self) -> ChunkPos
pub const fn section_relative(self) -> u16
pub const fn section_relative(self) -> u16
Section update packet coordinate: X in bits 8..11, Z in 4..7, Y in 0..3.
pub const fn section_index(self) -> usize
pub const fn section_index(self) -> usize
Block-state container index. This is a different layout from packets.
Trait Implementations§
impl Copy for BlockPos
impl Eq for BlockPos
impl StructuralPartialEq for BlockPos
Auto Trait Implementations§
impl Freeze for BlockPos
impl RefUnwindSafe for BlockPos
impl Send for BlockPos
impl Sync for BlockPos
impl Unpin for BlockPos
impl UnsafeUnpin for BlockPos
impl UnwindSafe for BlockPos
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more