Table of Contents

Struct BlockFiller

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

The flattened offset of a filler block from its origin block.

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

Remarks

All three axes are signed values in the range -16..16.

Value is formed by combining the axes into one 15-bit value. The five least-significant bits are the X axis, the next five are the Z axis, and the last five are the Y axis. All other bits should be zero.

Constructors

BlockFiller(int)

The flattened offset of a filler block from its origin block.

public BlockFiller(int Value)

Parameters

Value int

The raw offset value, in the range 0..32768.

Remarks

All three axes are signed values in the range -16..16.

Value is formed by combining the axes into one 15-bit value. The five least-significant bits are the X axis, the next five are the Z axis, and the last five are the Y axis. All other bits should be zero.

BlockFiller(int, int, int)

public BlockFiller(int x, int y, int z)

Parameters

x int
y int
z int

Properties

Value

The raw offset value, in the range 0..32768.

public int Value { get; init; }

Property Value

int

X

X offset, in the range -16..16.

public int X { get; }

Property Value

int

Y

Y offset, in the range -16..16.

public int Y { get; }

Property Value

int

Z

Z offset, in the range -16..16.

public int Z { get; }

Property Value

int

Methods

Deconstruct(out int, out int, out int)

public void Deconstruct(out int x, out int y, out int z)

Parameters

x int
y int
z int

Operators

implicit operator int(BlockFiller)

public static implicit operator int(BlockFiller filler)

Parameters

filler BlockFiller

Returns

int

implicit operator (int, int, int)(BlockFiller)

public static implicit operator (int, int, int)(BlockFiller filler)

Parameters

filler BlockFiller

Returns

(int, int, int)

implicit operator BlockFiller(int)

public static implicit operator BlockFiller(int value)

Parameters

value int

Returns

BlockFiller

implicit operator BlockFiller((int, int, int))

public static implicit operator BlockFiller((int, int, int) xyz)

Parameters

xyz (int, int, int)

Returns

BlockFiller