Skip to content

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).

FieldTypeDefaultDescription
MaxGrowSizeint8Maximum flock size after initial spawning.
BlockedRolesString[][]Roles excluded from joining this flock post-spawn.
public abstract int getMinFlockSize()
public abstract int pickFlockSize()

Returns a random flock size based on the asset’s configuration.

public String getId()
public int getMaxGrowSize()
public String[] getBlockedRoles()
public static AssetStore<String, FlockAsset, IndexedLookupTableAssetMap<String, FlockAsset>> getAssetStore()
public static IndexedLookupTableAssetMap<String, FlockAsset> getAssetMap()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.