Struct ZoneId
A zone as the game numbers it: 64 m square, zone (0, 0) centred on the world origin.
public readonly record struct ZoneId
Constructors
ZoneId(int, int)
A zone as the game numbers it: 64 m square, zone (0, 0) centred on the world origin.
public ZoneId(int X, int Z)
Parameters
XintZint
Fields
Size
public const float Size = 64
Field Value
- float
Properties
X
public int X { get; init; }
Property Value
- int
Z
public int Z { get; init; }
Property Value
- int
Methods
Around(float, float, float)
Every zone that the square of half-width radius round the point touches.
public static IReadOnlyList<ZoneId> Around(float x, float z, float radius)
Parameters
xfloatzfloatradiusfloat
Returns
- IReadOnlyList<ZoneId>
Of(float, float)
The zone holding the point (x, z), as the game computes it in 1.0.16.
public static ZoneId Of(float x, float z)
Parameters
xfloatzfloat
Returns
Rings(ZoneId)
The larger of the x and z zone distances: how many rings of zones separate the two.
public int Rings(ZoneId other)
Parameters
otherZoneId
Returns
- int
ToString()
The adapter's argument: x,z.
public override string ToString()
Returns
- string