Package com.hypixel.hytale.server.flock
Class FlockPlugin
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.flock.FlockPlugin
- All Implemented Interfaces:
CommandOwner
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ComponentType<EntityStore, Flock> private ComponentType<EntityStore, FlockMembership> private static FlockPluginprivate ComponentType<EntityStore, PersistentFlockData> Fields inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Ref<EntityStore> createFlock(Store<EntityStore> store, FlockAsset flockDefinition, String[] allowedRoles) static Ref<EntityStore> createFlock(Store<EntityStore> store, Role role) static FlockPluginget()static FlockgetFlock(ComponentAccessor<EntityStore> componentAccessor, Ref<EntityStore> reference) Deprecated.static Ref<EntityStore> getFlockReference(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) getPrefabRemappedFlockReference(int prefabId, UUID oldId) static booleanisFlockMember(Ref<EntityStore> ref, Store<EntityStore> store) voidsetup()voidshutdown()voidstart()static Ref<EntityStore> trySpawnFlock(Ref<EntityStore> npcRef, NPCEntity npc, int roleIndex, Vector3d position, Vector3f rotation, int flockSize, FlockAsset flockDefinition, TriConsumer<NPCEntity, Holder<EntityStore>, Store<EntityStore>> preAddToWorld, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn, Store<EntityStore> store) static Ref<EntityStore> trySpawnFlock(Ref<EntityStore> npcRef, NPCEntity npc, Store<EntityStore> store, int roleIndex, Vector3d position, Vector3f rotation, int flockSize, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn) static Ref<EntityStore> trySpawnFlock(Ref<EntityStore> npcRef, NPCEntity npc, Store<EntityStore> store, int roleIndex, Vector3d position, Vector3f rotation, FlockAsset flockDefinition, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn) Methods inherited from class com.hypixel.hytale.server.core.plugin.JavaPlugin
getClassLoader, getFile, getType, start0Methods inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
getAssetRegistry, getBasePermission, getBlockStateRegistry, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad, setup0, shutdown0, withConfig, withConfig
-
Field Details
-
instance
-
prefabFlockRemappings
-
flockComponentType
-
flockMembershipComponentType
-
persistentFlockDataComponentType
-
-
Constructor Details
-
FlockPlugin
-
-
Method Details
-
get
-
setup
public void setup()- Overrides:
setupin classPluginBase
-
start
public void start()- Overrides:
startin classPluginBase
-
shutdown
public void shutdown()- Overrides:
shutdownin classPluginBase
-
getFlockComponentType
-
getFlockMembershipComponentType
-
getPersistentFlockDataComponentType
-
getPrefabRemappedFlockReference
-
trySpawnFlock
@Nullable public static Ref<EntityStore> trySpawnFlock(@Nonnull Ref<EntityStore> npcRef, @Nonnull NPCEntity npc, @Nonnull Store<EntityStore> store, int roleIndex, @Nonnull Vector3d position, Vector3f rotation, @Nullable FlockAsset flockDefinition, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn) -
trySpawnFlock
@Nullable public static Ref<EntityStore> trySpawnFlock(@Nonnull Ref<EntityStore> npcRef, @Nonnull NPCEntity npc, @Nonnull Store<EntityStore> store, int roleIndex, @Nonnull Vector3d position, Vector3f rotation, int flockSize, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn) -
trySpawnFlock
@Nullable public static Ref<EntityStore> trySpawnFlock(@Nonnull Ref<EntityStore> npcRef, @Nonnull NPCEntity npc, int roleIndex, @Nonnull Vector3d position, Vector3f rotation, int flockSize, FlockAsset flockDefinition, TriConsumer<NPCEntity, Holder<EntityStore>, Store<EntityStore>> preAddToWorld, TriConsumer<NPCEntity, Ref<EntityStore>, Store<EntityStore>> postSpawn, @Nonnull Store<EntityStore> store) -
getFlock
@Nullable @Deprecated public static Flock getFlock(@Nonnull ComponentAccessor<EntityStore> componentAccessor, @Nonnull Ref<EntityStore> reference) Deprecated. -
createFlock
@Nonnull public static Ref<EntityStore> createFlock(@Nonnull Store<EntityStore> store, @Nonnull Role role) -
createFlock
@Nonnull public static Ref<EntityStore> createFlock(@Nonnull Store<EntityStore> store, @Nullable FlockAsset flockDefinition, @Nonnull String[] allowedRoles) -
getFlockReference
@Nullable public static Ref<EntityStore> getFlockReference(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isFlockMember
public static boolean isFlockMember(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store)
-