HyCodeYourTale
classpublicPriority 1

NPCPlugin

com.hypixel.hytale.server.npc.NPCPlugin

extends JavaPlugin

58

Methods

58

Public Methods

41

Fields

1

Constructors

Constants

BuilderCodec<NPCPlugin.NPCConfig>CODEC= BuilderCodec.builder(NPCPlugin.NPCConfig.class, NPCPlugin.NPCConfig::new) .append(new Ke...
Vector3fNULL_ROTATION= new Vector3f(0.0F, 0.0F, 0.0F)
shortPRIORITY_LOAD_NPC= -8
shortPRIORITY_SPAWN_VALIDATION= -7

Constructors

public
NPCPlugin(JavaPluginInit init)

Methods

Public Methods (58)

publicstatic
Role buildRole(Builder<Role> roleBuilder, BuilderInfo builderInfo, BuilderSupport builderSupport, int roleIndex)
@Nonnull
public
void collectRoleTick(int roleIndex, long nanos)
public
void collectSensorSupportFriendlyBlockingTest(int roleIndex, boolean cacheHit)
public
void collectSensorSupportInverseLosTest(int roleIndex, boolean cacheHit)
public
void collectSensorSupportLosTest(int roleIndex, boolean cacheHit, long time)
public
void collectSensorSupportTickDone(int roleIndex)
public
void forceValidation(int builderIndex)
public
ResourceType<EntityStore, AStarNodePoolProviderSimple> getAStarNodePoolProviderSimpleResourceType()
public
AttitudeMap getAttitudeMap()
public
ComponentType<EntityStore, BeaconSupport> getBeaconSupportComponentType()
public
ResourceType<EntityStore, Blackboard> getBlackboardResourceType()
public
BuilderInfo getBuilderInfo(Builder<?> builder)
@Nullable
public
BuilderManager getBuilderManager()
public
ComponentType<EntityStore, CombatViewSystems.CombatData> getCombatDataComponentType()
public
ResourceType<EntityStore, CombatViewSystems.CombatDataPool> getCombatDataPoolResourceType()
public
ComponentType<EntityStore, FailedSpawnComponent> getFailedSpawnComponentType()
public
int getIndex(String builderName)
public
ItemAttitudeMap getItemAttitudeMap()
public
int getMaxBlackboardBlockCountPerType()
public
int getMaxBlackboardBlockType()
public
String getName(int builderIndex)
@Nullable
public
ResourceType<EntityStore, NewSpawnStartTickingSystem.QueueResource> getNewSpawnStartTickingQueueResourceType()
public
ComponentType<EntityStore, NPCBlockEventSupport> getNpcBlockEventSupportComponentType()
public
ComponentType<EntityStore, NPCEntityEventSupport> getNpcEntityEventSupportComponentType()
public
ResourceType<EntityStore, SpatialResource<Ref<EntityStore>, EntityStore>> getNpcSpatialResource()
public
ComponentType<EntityStore, NPCRunTestsCommand.NPCTestData> getNpcTestDataComponentType()
public
int getPathChangeRevision()
public
ComponentType<EntityStore, PlayerBlockEventSupport> getPlayerBlockEventSupportComponentType()
public
ComponentType<EntityStore, PlayerEntityEventSupport> getPlayerEntityEventSupportComponentType()
public
String[] getPresetCoverageTestNPCs()
public
BuilderInfo getRoleBuilderInfo(int roleIndex)
@Nullable
public
ResourceType<EntityStore, RoleChangeSystem.RoleChangeQueue> getRoleChangeQueueResourceType()
public
List<String> getRoleTemplateNames(boolean spawnableOnly)
public
ResourceType<EntityStore, SortBufferProviderResource> getSortBufferProviderResourceResourceType()
public
ComponentType<EntityStore, StateEvaluator> getStateEvaluatorComponentType()
public
ComponentType<EntityStore, StepComponent> getStepComponentType()
public
ComponentType<EntityStore, Timers> getTimersComponentType()
public
ComponentType<EntityStore, ValueStore> getValueStoreComponentType()
public
boolean hasRoleName(String roleName)
public
boolean isAutoReload()
public
boolean isBenchmarkingRole()
public
boolean isBenchmarkingSensorSupport()
public
boolean isGenerateDescriptors()
public
boolean isGenerateDescriptorsFile()
public
boolean isLogFailingTestErrors()
public
boolean isValidateBuilder()
public
void onSchemaGenerate(GenerateSchemaEvent event)
public
BuilderInfo prepareRoleBuilderInfo(int roleIndex)
@Nonnull
public
<T> NPCPlugin registerCoreComponentType(String name, Supplier<Builder<T>> builder)
@Nonnull
publicstatic
void reloadNPCsWithRole(int roleIndex)
public
void setBuilderInvalid(int builderIndex)
public
void setRoleBuilderNeedsReload(Builder<?> builder)
public
void setupNPCLoading()
public
boolean startRoleBenchmark(double seconds, Consumer<Int2ObjectMap<TimeDistributionRecorder>> onFinished)
public
boolean startSensorSupportBenchmark(double seconds, Consumer<Int2ObjectMap<SensorSupportBenchmark>> onFinished)
public
boolean testAndValidateRole(BuilderInfo builderInfo)
public
Builder<Role> tryGetCachedValidRole(int roleIndex)
@Nullable
public
void validateSpawnableRole(String roleName)

Fields

Public Fields (9)

publicstaticString FACTORY_CLASS_ACTION
publicstaticString FACTORY_CLASS_ACTION_LIST
publicstaticString FACTORY_CLASS_BODY_MOTION
publicstaticString FACTORY_CLASS_HEAD_MOTION
publicstaticString FACTORY_CLASS_INSTRUCTION
publicstaticString FACTORY_CLASS_ROLE
publicstaticString FACTORY_CLASS_SENSOR
publicstaticString FACTORY_CLASS_TRANSIENT_PATH
publicstaticString ROLE_ASSETS_PATH

Protected Fields (10)

protectedboolean autoReload
protectedList<BuilderDescriptor> builderDescriptors
protectedboolean logFailingTestErrors
protectedint maxBlackboardBlockCountPerType
protectedString[] presetCoverageTestNPCs
protectedInt2ObjectMap<SensorSupportBenchmark> roleSensorSupportDistribution
protectedSensorSupportBenchmark roleSensorSupportDistributionAll
protectedInt2ObjectMap<TimeDistributionRecorder> roleTickDistribution
protectedTimeDistributionRecorder roleTickDistributionAll
protectedboolean validateBuilder

Private/Package Fields (22)

privateResourceType<EntityStore, AStarNodePoolProviderSimple> aStarNodePoolProviderSimpleResourceType
privateAttitudeMap attitudeMap
privateComponentType<EntityStore, BeaconSupport> beaconSupportComponentType
privateResourceType<EntityStore, Blackboard> blackboardResourceType
privateComponentType<EntityStore, CombatViewSystems.CombatData> combatDataComponentType
privateResourceType<EntityStore, CombatViewSystems.CombatDataPool> combatDataPoolResourceType
privateComponentType<EntityStore, FailedSpawnComponent> failedSpawnComponentType
privateNPCPlugin instance
privateItemAttitudeMap itemAttitudeMap
privateResourceType<EntityStore, NewSpawnStartTickingSystem.QueueResource> newSpawnStartTickingQueueResourceType
privateComponentType<EntityStore, NPCBlockEventSupport> npcBlockEventSupportComponentType
privateComponentType<EntityStore, NPCEntityEventSupport> npcEntityEventSupportComponentType
privateResourceType<EntityStore, SpatialResource<Ref<EntityStore>, EntityStore>> npcSpatialResource
privateComponentType<EntityStore, NPCRunTestsCommand.NPCTestData> npcTestDataComponentType
privateComponentType<EntityStore, PlayerBlockEventSupport> playerBlockEventSupportComponentType
privateComponentType<EntityStore, PlayerEntityEventSupport> playerEntityEventSupportComponentType
privateResourceType<EntityStore, RoleChangeSystem.RoleChangeQueue> roleChangeQueueResourceType
privateResourceType<EntityStore, SortBufferProviderResource> sortBufferProviderResourceResourceType
privateComponentType<EntityStore, StateEvaluator> stateEvaluatorComponentType
privateComponentType<EntityStore, StepComponent> stepComponentType
privateComponentType<EntityStore, Timers> timersComponentType
privateComponentType<EntityStore, ValueStore> valueStoreComponentType

Related Classes