classpublicPriority 3
Role
com.hypixel.hytale.server.npc.role.Role
implements IAnnotatedComponentCollection
95
Methods
95
Public Methods
77
Fields
1
Constructors
Constants
booleanDEBUG_APPLIED_FORCES= false
doubleINTERACTION_PLAYER_DISTANCE= 10.0
Constructors
public
Role(BuilderRole builder, BuilderSupport builderSupport)Methods
Public Methods (95)
public
void addDeferredAction(Role.DeferredAction handler)public
void addForce(Vector3d velocity, VelocityConfig velocityConfig)public
boolean canBreathe(BlockMaterial breathingMaterial, int fluidId)public
void clearOnce()public
void clearOnceIfNeeded()public
int componentCount()@Override
public
boolean couldBreathe(BlockMaterial breathingMaterial, int fluidId)public
boolean couldBreatheCached()public
void forceVelocity(Vector3d velocity, VelocityConfig velocityConfig, boolean ignoreDamping)public
String get()@Nonnull
public
MotionController getActiveMotionController()public
String getAppearanceName()public
Role.AvoidanceMode getAvoidanceMode()public
String getBalanceAsset()@Nullable
public
Steering getBodySteering()@Nonnull
public
double getCollisionProbeDistance()public
double getCollisionRadius()public
CombatSupport getCombatSupport()@Nonnull
public
IAnnotatedComponent getComponent(int index)@Override
public
double getDeathAnimationTime()public
Instruction getDeathInstruction()@Nullable
public
String getDeathInteraction()@Nullable
public
DebugSupport getDebugSupport()@Nonnull
public
float getDespawnAnimationTime()public
String getDropListId()public
EntitySupport getEntitySupport()@Nonnull
public
String[] getFlockAllowedRoles()@Nonnull
public
double getFlockInfluenceRange()public
int[] getFlockSpawnTypes()public
Steering getHeadSteering()@Nonnull
public
Set<Ref<EntityStore>> getIgnoredEntitiesForAvoidance()@Nonnull
public
int getIndex()@Override
public
double getInertia()public
void getInfo(Role role, ComponentInfo holder)@Override
public
int getInitialMaxHealth()public
Instruction getInteractionInstruction()@Nullable
public
Map<String, String> getInteractionVars()@Nullable
public
double getKnockbackScale()public
String getLabel()@Override
public
Vector3d getLastAvoidanceSteering()@Nonnull
public
Vector3d getLastSeparationSteering()@Nonnull
public
MarkedEntitySupport getMarkedEntitySupport()@Nonnull
public
String getMemoriesNameOverride()public
String getNameTranslationKey()public
IAnnotatedComponent getParent()@Nullable@Override
public
PositionCache getPositionCache()@Nonnull
public
int getRoleIndex()public
String getRoleName()public
RoleStats getRoleStats()public
Instruction getRootInstruction()public
double getSeparationDistance()public
float getSpawnLockTime()public
StateSupport getStateSupport()@Nonnull
public
String getSteeringMotionName()@Nullable
public
WorldSupport getWorldSupport()@Nonnull
public
boolean hasReachedTerminalAction()public
boolean isApplySeparation()public
boolean isAvoidingEntities()public
boolean isBackingAway()public
boolean isBreathesInAir()public
boolean isBreathesInWater()public
boolean isCanLeadFlock()public
boolean isCorpseStaysInFlock()public
boolean isFlagSet(int index)public
boolean isFlockSpawnTypesRandom()public
boolean isFriendly(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor)public
boolean isIgnoredForAvoidance(Ref<EntityStore> entityReference)public
boolean isInvulnerable()public
boolean isMemoriesNameOverriden()public
boolean isMemory()public
boolean isOnGround()public
boolean isPickupDropOnDeath()public
boolean isRoleChangeRequested()public
void loaded()public
void notifySensorMatch()public
void postRoleBuilt(BuilderSupport builderSupport)public
void processAddVelocityInstruction(Vector3d velocity, VelocityConfig velocityConfig)public
void processSetVelocityInstruction(Vector3d velocity, VelocityConfig velocityConfig)public
void removed()public
boolean requiresLeashPosition()public
void resetAllInstructions()public
void resetInstruction(int instruction)public
void setArmor(NPCEntity npcComponent, String[] armor)public
void setBackingAway(boolean backingAway)public
void setContext(IAnnotatedComponent parent, int index)@Override
public
void setFlag(int index, boolean value)public
void setMarkedTarget(String targetSlot, Ref<EntityStore> target)public
void setReachedTerminalAction(boolean hasReached)public
void setRoleChangeRequested()public
void setRoleIndex(int roleIndex, String roleName)public
void spawned(Holder<EntityStore> holder, NPCEntity npcComponent)public
Instruction swapTreeModeSteps(Instruction newStep)public
void teleported(World from, World to)public
void tick(Ref<EntityStore> ref, float tickTime, Store<EntityStore> store)public
void unloaded()Fields
Protected Fields (77)
protected
MotionController activeMotionControllerprotected
String allowedEnvironmentsprotected
String appearanceprotected
boolean applySeparationprotected
String[] armorprotected
Role.AvoidanceMode avoidanceModeprotected
boolean backingAwayprotected
String balanceAssetprotected
boolean breathesInAirprotected
boolean breathesInWaterprotected
boolean canLeadFlockprotected
double collisionForceFalloffprotected
double collisionProbeDistanceprotected
double collisionRadiusprotected
float collisionViewAngleprotected
float collisionViewHalfAngleCosineprotected
CombatSupport combatSupportprotected
boolean corpseStaysInFlockprotected
Instruction currentTreeModeStepprotected
double deathAnimationTimeprotected
Instruction deathInstructionprotected
String deathInteractionprotected
DebugSupport debugSupportprotected
byte defaultOffHandSlotprotected
float despawnAnimationTimeprotected
String dropListIdprotected
double entityAvoidanceStrengthprotected
EntitySupport entitySupportprotected
boolean[] flagsprotected
String[] flockAllowedRolesprotected
double flockInfluenceRangeprotected
int[] flockSpawnTypeIndicesprotected
String[] flockSpawnTypesprotected
boolean flockSpawnTypesRandomprotected
double flockWeightAlignmentprotected
double flockWeightCohesionprotected
double flockWeightSeparationprotected
boolean hasReachedTerminalActionprotected
String[] hotbarItemsprotected
int hotbarSlotsprotected
Instruction[] indexedInstructionsprotected
double inertiaprotected
int initialMaxHealthprotected
Instruction interactionInstructionprotected
Map<String, String> interactionVarsprotected
String inventoryContentsDropListprotected
int inventorySlotsprotected
boolean invulnerableprotected
boolean isActivatedprotected
boolean isAvoidingEntitiesprotected
boolean isMemoriesNameOverridenprotected
boolean isMemoryprotected
double knockbackScaleprotected
Instruction lastBodyMotionStepprotected
Instruction lastHeadMotionStepprotected
MarkedEntitySupport markedEntitySupportprotected
String memoriesNameOverrideprotected
String nameTranslationKeyprotected
String[] offHandItemsprotected
int offHandSlotsprotected
boolean pickupDropOnDeathprotected
PositionCache positionCacheprotected
boolean requiresLeashPositionprotected
boolean roleChangeRequestedprotected
int roleIndexprotected
String roleNameprotected
RoleStats roleStatsprotected
Instruction rootInstructionprotected
double separationDistanceprotected
double separationDistanceTargetprotected
double separationFarRadiusTargetprotected
double separationNearRadiusTargetprotected
double separationWeightprotected
float spawnLockTimeprotected
StateSupport stateSupportprotected
boolean stayInEnvironmentprotected
WorldSupport worldSupport