Skip to content

PersistentFlockData

Package: com.hypixel.hytale.server.flock

public class PersistentFlockData implements Component<EntityStore>

Serialized flock metadata stored on the leader NPC entity for chunk persistence and on the Flock entity at runtime. Tracks maximum grow size, allowed roles (sorted for binary search), and current flock size.

Serialization ID: "FlockData".

public static ComponentType<EntityStore, PersistentFlockData> getComponentType()
public PersistentFlockData(@Nullable FlockAsset flockDefinition, @Nonnull String[] allowedRoles)

Initializes from a FlockAsset and allowed roles. Blocked roles from the asset are removed from the allowed list.

public int getMaxGrowSize()
public boolean isFlockAllowedRole(String role)

Uses binary search on the sorted allowed roles array.

public void increaseSize()
public void decreaseSize()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.