WeightedSizeFlockAsset
Package: com.hypixel.hytale.server.flock.config
public class WeightedSizeFlockAsset extends FlockAssetFlock asset type where the initial size is picked from a weighted distribution (codec ID "Weighted"). Each index in the SizeWeights array corresponds to MinSize + index, and the weight determines relative probability.
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
MinSize | int | Absolute minimum flock size. |
SizeWeights | double[] | Weight array — index 0 = MinSize weight, index 1 = MinSize+1 weight, etc. |
Methods
Section titled “Methods”public int getMinSize()public double[] getSizeWeights()@Overridepublic int getMinFlockSize()Returns minSize.
@Overridepublic int pickFlockSize()Picks a weighted random index from sizeWeights and returns max(minSize, 1) + index.
Related Types
Section titled “Related Types”- FlockAsset — abstract base class
- RangeSizeFlockAsset — alternative implementation
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.