Table of Contents

Struct ChunkPos

Namespace
Shard.Gameplay.Universe.World.Chunks
Assembly
Shard.Gameplay.Universe.dll

3D coordinates of a chunk, in units of 32 blocks.

public readonly record struct ChunkPos : IEquatable<ChunkPos>
Implements
Inherited Members

Constructors

ChunkPos(int, int, int)

3D coordinates of a chunk, in units of 32 blocks.

public ChunkPos(int X, int Y, int Z)

Parameters

X int
Y int
Z int

Properties

MinBlock

The world block position of this chunk's minimum (local 0,0,0) corner.

public (int X, int Y, int Z) MinBlock { get; }

Property Value

(int, int, int)

X

public int X { get; init; }

Property Value

int

Y

public int Y { get; init; }

Property Value

int

Z

public int Z { get; init; }

Property Value

int

Methods

FromBlock(int, int, int)

The chunk containing a world block position (floor division, correct for negatives).

public static ChunkPos FromBlock(int blockX, int blockY, int blockZ)

Parameters

blockX int
blockY int
blockZ int

Returns

ChunkPos

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.