Contents
Class RegionReader
java.lang.Object
com.hypixel.hytale.builtin.buildertools.world.RegionReader
Walks a box of blocks and hands each position to a visitor, skipping positions whose storage is absent.
Iteration is X, then Z, then Y in the direction the caller picks. Tools disagree about the Y direction and some depend on it, so it is never normalised.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe outcome of a walk.static interfaceWhere the walk asks whether a position can be read, so a test can stand in forSectionAccessor.static interfacestatic enum -
Method Summary
Modifier and TypeMethodDescriptionstatic longunreadableCells(RegionReader.StorageSource accessor, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) How many cells of the inclusive box a walk would skip, without visiting any of them.static RegionReader.Resultwalk(RegionReader.StorageSource accessor, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, RegionReader.YDirection direction, RegionReader.VoxelVisitor visitor) Walks the inclusive box.static RegionReader.Resultwalk(RegionReader.StorageSource accessor, org.joml.Vector3ic min, org.joml.Vector3ic max, RegionReader.YDirection direction, RegionReader.VoxelVisitor visitor)
-
Method Details
-
walk
@Nonnull public static RegionReader.Result walk(@Nonnull RegionReader.StorageSource accessor, @Nonnull org.joml.Vector3ic min, @Nonnull org.joml.Vector3ic max, @Nonnull RegionReader.YDirection direction, @Nonnull RegionReader.VoxelVisitor visitor) -
unreadableCells
public static long unreadableCells(@Nonnull RegionReader.StorageSource accessor, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) How many cells of the inclusive box a walk would skip, without visiting any of them.A tool that clears what it reads asks this first. A walk over a box the world holds in part reads a hole, and has already cleared the rest by the time that shows.
-
walk
@Nonnull public static RegionReader.Result walk(@Nonnull RegionReader.StorageSource accessor, int minX, int minY, int minZ, int maxX, int maxY, int maxZ, @Nonnull RegionReader.YDirection direction, @Nonnull RegionReader.VoxelVisitor visitor) Walks the inclusive box. The bounds are normalised on each axis, so callers may pass them in any order.
-