Skip to content

BlockTickPlugin.Preprocessor

Package: com.hypixel.hytale.builtin.blocktick

public static final class BlockTickPlugin.Preprocessor

Thread-local helper used by BlockTickPlugin.discoverTickingBlocks to collect block type IDs that have a tick procedure and then find all block indices matching those IDs within a section. Avoids per-call allocation by storing instances in a ThreadLocal.

ModifierTypeName
public static finalThreadLocal<BlockTickPlugin.Preprocessor>LOCAL
public finalIntListtickingIds
public finalIntListtickingIndices
public finalIntConsumertypeCollector
public finalIntConsumerindexCollector
ModifierReturn TypeSignature
publicvoidclear()
  • typeCollector checks each block ID against BlockType.getAssetMap() and adds the ID to tickingIds if the block type has a non-null TickProcedure.
  • indexCollector adds matching block indices to tickingIndices.
  • clear() empties both tickingIds and tickingIndices lists for reuse.
  • Accessed via LOCAL.get() to obtain the thread-local instance.
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.