BlockTickPlugin.Preprocessor
Package: com.hypixel.hytale.builtin.blocktick
public static final class BlockTickPlugin.PreprocessorThread-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.
Fields
Section titled “Fields”| Modifier | Type | Name |
|---|---|---|
public static final | ThreadLocal<BlockTickPlugin.Preprocessor> | LOCAL |
public final | IntList | tickingIds |
public final | IntList | tickingIndices |
public final | IntConsumer | typeCollector |
public final | IntConsumer | indexCollector |
Methods
Section titled “Methods”| Modifier | Return Type | Signature |
|---|---|---|
public | void | clear() |
Behavior
Section titled “Behavior”typeCollectorchecks each block ID againstBlockType.getAssetMap()and adds the ID totickingIdsif the block type has a non-nullTickProcedure.indexCollectoradds matching block indices totickingIndices.clear()empties bothtickingIdsandtickingIndiceslists for reuse.- Accessed via
LOCAL.get()to obtain the thread-local instance.
Related Types
Section titled “Related Types”- BlockTickPlugin — the enclosing plugin that uses this preprocessor
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.