Contents
- Description
- Method Summary
- Method Details
- collectActiveAugmentTags(Store, Vector3i, double)
- requirementsMet(Store, Vector3i, double, String[])
- syncBenchAugmentTags(Store, Ref, Vector3i)
- canReplaceBlock(World, Vector3i, String)
- replaceBlock(World, Store, Ref, String)
- applyState(World, Store, Ref, String)
- currentBlockType(Store, Ref)
- worldPos(Store, Ref)
Class AugmentBlocksUtils
java.lang.Object
com.hypixel.hytale.builtin.augmentblocks.AugmentBlocksUtils
Stateless helpers over the KDTree spatial index. Augment blocks interconnect with augment tags: a block grants its
current level's
GrantsAugmentTags (the flat list at level 0), and a dependent gates on
RequiredAugmentTags. Tags are never persisted; every query recomputes them from the loaded augment blocks
within the querying block's Radius.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyState(World world, Store<ChunkStore> store, Ref<ChunkStore> ref, String state) Swaps the block atrefto the named state.static booleancanReplaceBlock(World world, org.joml.Vector3i pos, String newBlockTypeKey) collectActiveAugmentTags(Store<ChunkStore> store, org.joml.Vector3i center, double radius) Collects every tag currently granted by the augment blocks withinradiusofcenter: each block grants exactly its current level's list (level 0 = the flat list).static BlockTypecurrentBlockType(Store<ChunkStore> store, Ref<ChunkStore> ref) The block type currently placed atref, or null whenrefhas no block state.static voidreplaceBlock(World world, Store<ChunkStore> store, Ref<ChunkStore> ref, String newBlockTypeKey) Replaces the block atrefwith a different block type; the new block entity is created fresh.static booleanrequirementsMet(Store<ChunkStore> store, org.joml.Vector3i center, double radius, String[] requiredAugmentTags) Whether every required tag is granted by an augment block withinradiusofcenter.static voidsyncBenchAugmentTags(Store<ChunkStore> store, Ref<ChunkStore> ref, org.joml.Vector3i pos) Recomputes the tags granted to the crafting bench atref, gating recipes that declareRequiredAugmentTags.static org.joml.Vector3iworldPos(Store<ChunkStore> store, Ref<ChunkStore> ref)
-
Method Details
-
collectActiveAugmentTags
@Nonnull public static Set<String> collectActiveAugmentTags(@Nonnull Store<ChunkStore> store, @Nonnull org.joml.Vector3i center, double radius) Collects every tag currently granted by the augment blocks withinradiusofcenter: each block grants exactly its current level's list (level 0 = the flat list). A level only grants while its ownRequiredAugmentTagsare active and grants feed each other, so this iterates to a fixpoint: removing a root provider (e.g. the power switch) cascades its dependents offline even though they remain upgraded. -
requirementsMet
public static boolean requirementsMet(@Nonnull Store<ChunkStore> store, @Nonnull org.joml.Vector3i center, double radius, @Nonnull String[] requiredAugmentTags) Whether every required tag is granted by an augment block withinradiusofcenter. -
syncBenchAugmentTags
public static void syncBenchAugmentTags(@Nonnull Store<ChunkStore> store, @Nonnull Ref<ChunkStore> ref, @Nonnull org.joml.Vector3i pos) Recomputes the tags granted to the crafting bench atref, gating recipes that declareRequiredAugmentTags. Registered as theBenchBlocktag refresher; the bench's own tier is untouched. Benches without anAugmentBlockare skipped. -
canReplaceBlock
-
replaceBlock
public static void replaceBlock(@Nonnull World world, @Nonnull Store<ChunkStore> store, @Nonnull Ref<ChunkStore> ref, @Nonnull String newBlockTypeKey) Replaces the block atrefwith a different block type; the new block entity is created fresh. -
applyState
public static void applyState(@Nonnull World world, @Nonnull Store<ChunkStore> store, @Nonnull Ref<ChunkStore> ref, @Nonnull String state) Swaps the block atrefto the named state. Must pass the block's CURRENT (possibly state-variant) type: with the base type, swapping back to"default"silently no-ops (the state comparison and thegetDefaultStateKey()resolution both break down on the base itself). -
currentBlockType
@Nullable public static BlockType currentBlockType(@Nonnull Store<ChunkStore> store, @Nonnull Ref<ChunkStore> ref) The block type currently placed atref, or null whenrefhas no block state. -
worldPos
@Nullable public static org.joml.Vector3i worldPos(@Nonnull Store<ChunkStore> store, @Nonnull Ref<ChunkStore> ref)
-