Skip to content

WeightedSizeFlockAsset

Package: com.hypixel.hytale.server.flock.config

public class WeightedSizeFlockAsset extends FlockAsset

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

FieldTypeDescription
MinSizeintAbsolute minimum flock size.
SizeWeightsdouble[]Weight array — index 0 = MinSize weight, index 1 = MinSize+1 weight, etc.
public int getMinSize()
public double[] getSizeWeights()
@Override
public int getMinFlockSize()

Returns minSize.

@Override
public int pickFlockSize()

Picks a weighted random index from sizeWeights and returns max(minSize, 1) + index.

Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.