Skip to content

BuilderToolsPlugin.CachedAccessor

Package: com.hypixel.hytale.builtin.buildertools

public static class CachedAccessor extends AbstractCachedAccessor

A thread-local cached accessor for chunk section components, optimized for builder tool operations that need repeated access to fluid sections, block physics, and block sections within a chunk neighborhood. Extends AbstractCachedAccessor with 3 component slots.

@Nonnull
public static BuilderToolsPlugin.CachedAccessor of(ComponentAccessor<ChunkStore> accessor, int cx, int cy, int cz, int radius)

Returns the thread-local CachedAccessor instance, initialized with the given ChunkStore accessor and centered at chunk coordinates (cx, cy, cz) with the specified radius.

public CachedAccessor()

Initializes with 3 component slots (fluid, physics, blocks).

@Nullable
public FluidSection getFluidSection(int cx, int cy, int cz)

Returns the FluidSection at the given chunk section coordinates, or null if not cached.

@Nullable
public BlockPhysics getBlockPhysics(int cx, int cy, int cz)

Returns the BlockPhysics component at the given chunk section coordinates, or null if not cached.

@Nullable
public BlockSection getBlockSection(int cx, int cy, int cz)

Returns the BlockSection at the given chunk section coordinates, or null if not cached.

SlotValueComponent
FLUID_COMPONENT0FluidSection
PHYSICS_COMPONENT1BlockPhysics
BLOCKS_COMPONENT2BlockSection
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.