FlockAsset
Package: com.hypixel.hytale.server.flock.config
public abstract class FlockAsset implements JsonAssetWithMap<String, IndexedLookupTableAssetMap<String, FlockAsset>>Abstract base class for flock configuration assets loaded from JSON at path NPC/Flocks. Defines the size parameters and role restrictions for flock spawning. Two concrete implementations: RangeSizeFlockAsset (default, size from a min-max range) and WeightedSizeFlockAsset (size from weighted distribution).
Fields
Section titled “Fields”| Field | Type | Default | Description |
|---|---|---|---|
MaxGrowSize | int | 8 | Maximum flock size after initial spawning. |
BlockedRoles | String[] | [] | Roles excluded from joining this flock post-spawn. |
Abstract Methods
Section titled “Abstract Methods”public abstract int getMinFlockSize()public abstract int pickFlockSize()Returns a random flock size based on the asset’s configuration.
Methods
Section titled “Methods”public String getId()public int getMaxGrowSize()public String[] getBlockedRoles()public static AssetStore<String, FlockAsset, IndexedLookupTableAssetMap<String, FlockAsset>> getAssetStore()public static IndexedLookupTableAssetMap<String, FlockAsset> getAssetMap()Related Types
Section titled “Related Types”- RangeSizeFlockAsset — default implementation with min-max range
- WeightedSizeFlockAsset — weighted distribution implementation
- FlockPlugin — registers the asset store
- PersistentFlockData — uses max grow size and blocked roles
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.