Class WorldBounds
Constraints on a world's extent, in chunk coordinates. Each side is an inclusive chunk-coord limit;
null means unbounded in that direction (up to the int32 chunk edge). All-null is a fully
infinite world (Infinite). A bounded world lets generation/streaming stop at a wall;
axes are independent, so a world can be finite horizontally (X/Z) yet open vertically (Y), etc.
public sealed record WorldBounds : IEquatable<WorldBounds>
- Inheritance
-
WorldBounds
- Implements
- Inherited Members
Constructors
WorldBounds(int?, int?, int?, int?, int?, int?)
Constraints on a world's extent, in chunk coordinates. Each side is an inclusive chunk-coord limit;
null means unbounded in that direction (up to the int32 chunk edge). All-null is a fully
infinite world (Infinite). A bounded world lets generation/streaming stop at a wall;
axes are independent, so a world can be finite horizontally (X/Z) yet open vertically (Y), etc.
public WorldBounds(int? MinX = null, int? MaxX = null, int? MinY = null, int? MaxY = null, int? MinZ = null, int? MaxZ = null)
Parameters
Fields
Infinite
A fully infinite world — no constraint on any axis.
public static readonly WorldBounds Infinite
Field Value
Properties
IsInfinite
Whether the world is unbounded on every axis and direction.
public bool IsInfinite { get; }
Property Value
MaxX
public int? MaxX { get; init; }
Property Value
- int?
MaxY
public int? MaxY { get; init; }
Property Value
- int?
MaxZ
public int? MaxZ { get; init; }
Property Value
- int?
MinX
public int? MinX { get; init; }
Property Value
- int?
MinY
public int? MinY { get; init; }
Property Value
- int?
MinZ
public int? MinZ { get; init; }
Property Value
- int?
Methods
Contains(ChunkPos)
Whether a chunk lies within the constraints (a null side never excludes).
public bool Contains(ChunkPos chunk)
Parameters
chunkChunkPos