ReferenceSlotMapper
Package: com.hypixel.hytale.server.npc.asset.builder
public class ReferenceSlotMapper<T> extends SlotMapperExtends SlotMapper to associate each slot with a lazily-created reference object. When a slot is requested, if it does not already have an associated object, one is created via the provided Supplier<T>. Used by BuilderSupport for timer slots.
Type Parameters
Section titled “Type Parameters”| Parameter | Description |
|---|---|
T | The reference object type (e.g., Timer). |
Constructors
Section titled “Constructors”public ReferenceSlotMapper(Supplier<T> slotSupplier)public ReferenceSlotMapper(Supplier<T> slotSupplier, boolean trackNames)Methods
Section titled “Methods”getReference
Section titled “getReference”public T getReference(String name)Returns the reference object for the named slot, creating it on first access.
getReferenceList
Section titled “getReferenceList”public List<T> getReferenceList()Returns the list of all created reference objects.
Related Types
Section titled “Related Types”- SlotMapper — parent class
- BuilderSupport — uses this for timer allocation
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.