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
Field entityStoreRegistry.
flockSize
Field flockSize.
role
Field role.
membershipComponent
Field membershipComponent.
flockReference
Field flockReference.
boundingBoxComponent
Field boundingBoxComponent.
transformComponent
Field transformComponent.
boundingBox
Field boundingBox.
bodyRotation
Field bodyRotation.
x
Field x.
y
Field y.
z
Field z.
yaw
Field yaw.
randomSpawn
Field randomSpawn.
roles
Field roles.
rolesSize
Field rolesSize.
memberRef
Field memberRef.
memberBoundingBoxComponent
Field memberBoundingBoxComponent.
memberTransformComponent
Field memberTransformComponent.
memberHeadRotationComponent
Field memberHeadRotationComponent.
offsetY
Field offsetY.
flockMembershipComponent
Field flockMembershipComponent.
membershipRef
Field membershipRef.
holder
Field holder.
ref
Field ref.
Method Detail
setup
void
setup
()
Method setup.
IndexedLookupTableAssetMap
new
IndexedLookupTableAssetMap
(FlockAsset[]::new)
Method IndexedLookupTableAssetMap.
- Parameters:
FlockAsset[]::newFlockAsset[]::new
PrefabPasteEventSystem
new
PrefabPasteEventSystem
(this)
Method PrefabPasteEventSystem.
- Parameters:
thisthis
start
void
start
()
Method start.
shutdown
void
shutdown
()
Method shutdown.
getFlockComponentType
Flock>
getFlockComponentType
()
Method getFlockComponentType.
getFlockMembershipComponentType
FlockMembership>
getFlockMembershipComponentType
()
Method getFlockMembershipComponentType.
getPersistentFlockDataComponentType
PersistentFlockData>
getPersistentFlockDataComponentType
()
Method getPersistentFlockDataComponentType.
getPrefabRemappedFlockReference
UUID
getPrefabRemappedFlockReference
(final int prefabId, final UUID oldId)
Method getPrefabRemappedFlockReference.
- Parameters:
final intprefabIdfinal UUIDoldId
trySpawnFlock
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 RefnpcRef@Nonnull final NPCEntitynpc@Nonnull final Storestorefinal introleIndex@Nonnull final Vector3dpositionfinal Vector3frotation@Nullable final FlockAssetflockDefinitionfinal TriConsumerpostSpawn, Store >
getFlock
Flock
getFlock
(@Nonnull final ComponentAccessor componentAccessor, @Nonnull final Ref reference)
Method getFlock.
- Parameters:
@Nonnull final ComponentAccessorcomponentAccessor@Nonnull final Refreference
EntityGroup
new
EntityGroup
()
Method EntityGroup.
Flock
new
Flock
(flockDefinition, allowedRoles)
Method Flock.
- Parameters:
flockDefinitionflockDefinitionallowedRolesallowedRoles
getFlockReference
Ref
getFlockReference
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method getFlockReference.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
handle
void
handle
(@Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer, @Nonnull final PrefabPasteEvent event)
Method handle.
- Parameters:
@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer@Nonnull final PrefabPasteEventevent