FlockPlugin

public class FlockPlugin extends JavaPlugin

The main plugin class for Flock. This plugin provides gameplay features for the Hytale server. Extend this class to create a plugin.

java.lang.Object > JavaPlugin > FlockPlugin

Field Summary

entityStoreRegistry

final ComponentRegistryProxy entityStoreRegistry

Field entityStoreRegistry.

flockSize

final int flockSize

Field flockSize.

role

final Role role

Field role.

membershipComponent

final FlockMembership membershipComponent

Field membershipComponent.

flockReference

final Ref flockReference

Field flockReference.

boundingBoxComponent

final BoundingBox boundingBoxComponent

Field boundingBoxComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

boundingBox

final Box boundingBox

Field boundingBox.

bodyRotation

final Vector3f bodyRotation

Field bodyRotation.

x

final double x

Field x.

y

final int y

Field y.

z

final double z

Field z.

yaw

final double yaw

Field yaw.

randomSpawn

final boolean randomSpawn

Field randomSpawn.

roles

final int[] roles

Field roles.

rolesSize

final int rolesSize

Field rolesSize.

memberRef

final Ref memberRef

Field memberRef.

memberBoundingBoxComponent

final BoundingBox memberBoundingBoxComponent

Field memberBoundingBoxComponent.

memberTransformComponent

final TransformComponent memberTransformComponent

Field memberTransformComponent.

memberHeadRotationComponent

final HeadRotation memberHeadRotationComponent

Field memberHeadRotationComponent.

offsetY

final double offsetY

Field offsetY.

flockMembershipComponent

final FlockMembership flockMembershipComponent

Field flockMembershipComponent.

membershipRef

final Ref membershipRef

Field membershipRef.

holder

final Holder holder

Field holder.

ref

final Ref ref

Field ref.

Method Detail

get

static FlockPlugin get ()

Method get.

FlockPlugin

public public FlockPlugin (@Nonnull final JavaPluginInit init)

Method FlockPlugin.

Parameters:
@Nonnull final JavaPluginInit init

setup

public void setup ()

Method setup.

IndexedLookupTableAssetMap

public new IndexedLookupTableAssetMap (FlockAsset[]::new)

Method IndexedLookupTableAssetMap.

Parameters:
FlockAsset[]::new FlockAsset[]::new

PrefabPasteEventSystem

public new PrefabPasteEventSystem (this)

Method PrefabPasteEventSystem.

Parameters:
this this

start

public void start ()

Method start.

shutdown

public void shutdown ()

Method shutdown.

getFlockComponentType

public Flock> getFlockComponentType ()

Method getFlockComponentType.

getFlockMembershipComponentType

public FlockMembership> getFlockMembershipComponentType ()

Method getFlockMembershipComponentType.

getPersistentFlockDataComponentType

public PersistentFlockData> getPersistentFlockDataComponentType ()

Method getPersistentFlockDataComponentType.

getPrefabRemappedFlockReference

public UUID getPrefabRemappedFlockReference (final int prefabId, final UUID oldId)

Method getPrefabRemappedFlockReference.

Parameters:
final int prefabId
final UUID oldId

trySpawnFlock

static Ref trySpawnFlock (@Nonnull final Ref npcRef, @Nonnull final NPCEntity npc, @Nonnull final Store store, final int roleIndex, @Nonnull final Vector3d position, final Vector3f rotation, @Nullable final FlockAsset flockDefinition, final TriConsumer, Store> postSpawn)

Method trySpawnFlock.

Parameters:
@Nonnull final Ref npcRef
@Nonnull final NPCEntity npc
@Nonnull final Store store
final int roleIndex
@Nonnull final Vector3d position
final Vector3f rotation
@Nullable final FlockAsset flockDefinition
final TriConsumer, Store> postSpawn

getFlock

static Flock getFlock (@Nonnull final ComponentAccessor componentAccessor, @Nonnull final Ref reference)

Method getFlock.

Parameters:
@Nonnull final ComponentAccessor componentAccessor
@Nonnull final Ref reference

createFlock

static Ref createFlock (@Nonnull final Store store, @Nonnull final Role role)

Method createFlock.

Parameters:
@Nonnull final Store store
@Nonnull final Role role

EntityGroup

public new EntityGroup ()

Method EntityGroup.

Flock

public new Flock (flockDefinition, allowedRoles)

Method Flock.

Parameters:
flockDefinition flockDefinition
allowedRoles allowedRoles

getFlockReference

static Ref getFlockReference (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method getFlockReference.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

isFlockMember

static boolean isFlockMember (@Nonnull final Ref ref, @Nonnull final Store store)

Method isFlockMember.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store

handle

public void handle (@Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer, @Nonnull final PrefabPasteEvent event)

Method handle.

Parameters:
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer
@Nonnull final PrefabPasteEvent event