BlockPos

class BlockPos
Int32 x { get; set; }

Local x coordinate.

Int32 y { get; set; }

local y coordinate.

Int32 z { get; set; }

local z coordinate.

ChunkPos chunkPos { get; set; }

The chunk this block is located in.

static BlockPos zero { get; }

Shorthand for writing BlockPos(0, 0, 0).

static BlockPos up { get; }

Shorthand for writing BlockPos(0, 1, 0).

static BlockPos down { get; }

Shorthand for writing BlockPos(0, -1, 0).

static BlockPos north { get; }

Shorthand for writing BlockPos(0, 0, 1).

static BlockPos south { get; }

Shorthand for writing BlockPos(0, 0, -1).

static BlockPos east { get; }

Shorthand for writing BlockPos(1, 0, 0).

static BlockPos west { get; }

Shorthand for writing BlockPos(-1, 0, 0).

BlockPos (Int32 x, Int32 y, Int32 z, ChunkPos chunkPos = ChunkPos.zero)

Creates a new BlockPos using explicit x, y, and z coordinates inside a ChunkPos.

public Int32 GetWorldX ()

Returns global x coordinate.

public Int32 GetWorldY ()

Returns global y coordinate.

public Int32 GetWorldZ ()

Returns global z coordinate.

Int32 Mod (Int32 x, Int32 m)

The default C# modulus operator % returns negative numbers for negative input, which is undesirable.

void Correct ()

This corrects overflown coordinates, appropriately shifting chunkPos and clamping x, y, and z.