HyCodeYourTale
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)

protectedMotionController activeMotionController
protectedString allowedEnvironments
protectedString appearance
protectedboolean applySeparation
protectedString[] armor
protectedRole.AvoidanceMode avoidanceMode
protectedboolean backingAway
protectedString balanceAsset
protectedboolean breathesInAir
protectedboolean breathesInWater
protectedboolean canLeadFlock
protecteddouble collisionForceFalloff
protecteddouble collisionProbeDistance
protecteddouble collisionRadius
protectedfloat collisionViewAngle
protectedfloat collisionViewHalfAngleCosine
protectedCombatSupport combatSupport
protectedboolean corpseStaysInFlock
protectedInstruction currentTreeModeStep
protecteddouble deathAnimationTime
protectedInstruction deathInstruction
protectedString deathInteraction
protectedDebugSupport debugSupport
protectedbyte defaultOffHandSlot
protectedfloat despawnAnimationTime
protectedString dropListId
protecteddouble entityAvoidanceStrength
protectedEntitySupport entitySupport
protectedboolean[] flags
protectedString[] flockAllowedRoles
protecteddouble flockInfluenceRange
protectedint[] flockSpawnTypeIndices
protectedString[] flockSpawnTypes
protectedboolean flockSpawnTypesRandom
protecteddouble flockWeightAlignment
protecteddouble flockWeightCohesion
protecteddouble flockWeightSeparation
protectedboolean hasReachedTerminalAction
protectedString[] hotbarItems
protectedint hotbarSlots
protectedInstruction[] indexedInstructions
protecteddouble inertia
protectedint initialMaxHealth
protectedInstruction interactionInstruction
protectedMap<String, String> interactionVars
protectedString inventoryContentsDropList
protectedint inventorySlots
protectedboolean invulnerable
protectedboolean isActivated
protectedboolean isAvoidingEntities
protectedboolean isMemoriesNameOverriden
protectedboolean isMemory
protecteddouble knockbackScale
protectedInstruction lastBodyMotionStep
protectedInstruction lastHeadMotionStep
protectedMarkedEntitySupport markedEntitySupport
protectedString memoriesNameOverride
protectedString nameTranslationKey
protectedString[] offHandItems
protectedint offHandSlots
protectedboolean pickupDropOnDeath
protectedPositionCache positionCache
protectedboolean requiresLeashPosition
protectedboolean roleChangeRequested
protectedint roleIndex
protectedString roleName
protectedRoleStats roleStats
protectedInstruction rootInstruction
protecteddouble separationDistance
protecteddouble separationDistanceTarget
protecteddouble separationFarRadiusTarget
protecteddouble separationNearRadiusTarget
protecteddouble separationWeight
protectedfloat spawnLockTime
protectedStateSupport stateSupport
protectedboolean stayInEnvironment
protectedWorldSupport worldSupport

Related Classes