public class NPCEntity extendsLivingEntityimplementsINonPlayerCharacter
Class NPCEntity. Provides npcentity functionality for the Hytale server.
java.lang.Object > LivingEntity > NPCEntity
Field Summary
roleName
Field roleName.
roleIndex
Field roleIndex.
role
Field role.
spawnRoleIndex
Field spawnRoleIndex.
spawnRoleName
Field spawnRoleName.
spawnConfigurationName
Field spawnConfigurationName.
environmentIndex
Field environmentIndex.
spawnConfigurationIndex
Field spawnConfigurationIndex.
isSpawnTracked
Field isSpawnTracked.
isDespawning
Field isDespawning.
isPlayingDespawnAnim
Field isPlayingDespawnAnim.
despawnRemainingSeconds
Field despawnRemainingSeconds.
despawnCheckRemainingSeconds
Field despawnCheckRemainingSeconds.
despawnAnimationRemainingSeconds
Field despawnAnimationRemainingSeconds.
cachedEntityHorizontalSpeedMultiplier
Field cachedEntityHorizontalSpeedMultiplier.
leashHeading
Field leashHeading.
leashPitch
Field leashPitch.
hasLeashPosition
Field hasLeashPosition.
hoverPhase
Field hoverPhase.
hoverHeight
Field hoverHeight.
initialModelScale
Field initialModelScale.
spawnInstant
Field spawnInstant.
pathManager
Field pathManager.
blackboardBlockTypeView
Field blackboardBlockTypeView.
blackboardBlockTypeSets
Field blackboardBlockTypeSets.
blackboardBlockChangeView
Field blackboardBlockChangeView.
blackboardEntityEventView
Field blackboardEntityEventView.
alarmStore
Field alarmStore.
worldgenId
Field worldgenId.
modelComponent
Field modelComponent.
activeAnimationComponent
Field activeAnimationComponent.
activeAnimations
Field activeAnimations.
view
Field view.
store
Field store.
initiator
Field initiator.
isPlayer
Field isPlayer.
name
Field name.
oldState
Field oldState.
model
Field model.
npcComponent
Field npcComponent.
modelAsset
Field modelAsset.
effectControllerComponent
Field effectControllerComponent.
cachedEffectIndexes
Field cachedEffectIndexes.
effect
Field effect.
applicationEffects
Field applicationEffects.
multiplier
Field multiplier.
Method Detail
getComponentType
NPCEntity>
getComponentType
()
Method getComponentType.
NPCEntity
public
NPCEntity
()
Method NPCEntity.
Inventory
new
Inventory
((short)
Method Inventory.
- Parameters:
(short(short
invalidateCachedHorizontalSpeedMultiplier
void
invalidateCachedHorizontalSpeedMultiplier
()
Method invalidateCachedHorizontalSpeedMultiplier.
tickDespawnAnimationRemainingSeconds
boolean
tickDespawnAnimationRemainingSeconds
(final float dt)
Method tickDespawnAnimationRemainingSeconds.
- Parameters:
final floatdt
setDespawnAnimationRemainingSeconds
void
setDespawnAnimationRemainingSeconds
(final float seconds)
Method setDespawnAnimationRemainingSeconds.
- Parameters:
final floatseconds
tickDespawnRemainingSeconds
boolean
tickDespawnRemainingSeconds
(final float dt)
Method tickDespawnRemainingSeconds.
- Parameters:
final floatdt
setDespawnRemainingSeconds
void
setDespawnRemainingSeconds
(final float seconds)
Method setDespawnRemainingSeconds.
- Parameters:
final floatseconds
setDespawning
void
setDespawning
(final boolean despawning)
Method setDespawning.
- Parameters:
final booleandespawning
setPlayingDespawnAnim
void
setPlayingDespawnAnim
(final boolean playingDespawnAnim)
Method setPlayingDespawnAnim.
- Parameters:
final booleanplayingDespawnAnim
tickDespawnCheckRemainingSeconds
boolean
tickDespawnCheckRemainingSeconds
(final float dt)
Method tickDespawnCheckRemainingSeconds.
- Parameters:
final floatdt
setDespawnCheckRemainingSeconds
void
setDespawnCheckRemainingSeconds
(final float seconds)
Method setDespawnCheckRemainingSeconds.
- Parameters:
final floatseconds
setInitialModelScale
void
setInitialModelScale
(final float scale)
Method setInitialModelScale.
- Parameters:
final floatscale
playAnimation
void
playAnimation
(@Nonnull final Ref ref, @Nonnull final AnimationSlot animationSlot, @Nullable final String animationId, @Nonnull final ComponentAccessor componentAccessor)
Method playAnimation.
- Parameters:
@Nonnull final Refref@Nonnull final AnimationSlotanimationSlot@Nullable final StringanimationId@Nonnull final ComponentAccessorcomponentAccessor
clearDamageData
void
clearDamageData
()
Method clearDamageData.
setToDespawn
void
setToDespawn
()
Method setToDespawn.
setDespawnTime
void
setDespawnTime
(final float time)
Method setDespawnTime.
- Parameters:
final floattime
getDespawnTime
double
getDespawnTime
()
Method getDespawnTime.
canBreathe
boolean
canBreathe
(@Nonnull final Ref ref, @Nonnull final BlockMaterial breathingMaterial, final int fluidId, @Nonnull final ComponentAccessor componentAccessor)
Method canBreathe.
- Parameters:
@Nonnull final Refref@Nonnull final BlockMaterialbreathingMaterialfinal intfluidId@Nonnull final ComponentAccessorcomponentAccessor
getCanCauseDamage
boolean
getCanCauseDamage
(@Nonnull final Ref attackerRef, @Nonnull final ComponentAccessor componentAccessor)
Method getCanCauseDamage.
- Parameters:
@Nonnull final RefattackerRef@Nonnull final ComponentAccessorcomponentAccessor
onFlockSetState
void
onFlockSetState
(@Nonnull final Ref ref, @Nonnull final String state, @Nullable final String subState, @Nonnull final ComponentAccessor componentAccessor)
Method onFlockSetState.
- Parameters:
@Nonnull final Refref@Nonnull final Stringstate@Nullable final StringsubState@Nonnull final ComponentAccessorcomponentAccessor
onFlockSetTarget
Method onFlockSetTarget.
- Parameters:
@Nonnull final StringtargetSlot@Nonnull final Reftarget
saveLeashInformation
void
saveLeashInformation
(@Nonnull final Vector3d position, @Nonnull final Vector3f rotation)
Method saveLeashInformation.
- Parameters:
@Nonnull final Vector3dposition@Nonnull final Vector3frotation
saveLeashBlockType
void
saveLeashBlockType
()
Method saveLeashBlockType.
requiresLeashPosition
boolean
requiresLeashPosition
()
Method requiresLeashPosition.
getLeashHeading
float
getLeashHeading
()
Method getLeashHeading.
setLeashHeading
void
setLeashHeading
(final float leashHeading)
Method setLeashHeading.
- Parameters:
final floatleashHeading
getLeashPitch
float
getLeashPitch
()
Method getLeashPitch.
setLeashPitch
void
setLeashPitch
(final float leashPitch)
Method setLeashPitch.
- Parameters:
final floatleashPitch
getHoverPhase
float
getHoverPhase
()
Method getHoverPhase.
setHoverPhase
void
setHoverPhase
(final float hoverPhase)
Method setHoverPhase.
- Parameters:
final floathoverPhase
getHoverHeight
double
getHoverHeight
()
Method getHoverHeight.
setHoverHeight
void
setHoverHeight
(final double hoverHeight)
Method setHoverHeight.
- Parameters:
final doublehoverHeight
getRoleName
String
getRoleName
()
Method getRoleName.
setRoleName
void
setRoleName
(final String roleName)
Method setRoleName.
- Parameters:
final StringroleName
getRoleIndex
int
getRoleIndex
()
Method getRoleIndex.
setRoleIndex
void
setRoleIndex
(final int roleIndex)
Method setRoleIndex.
- Parameters:
final introleIndex
getSpawnRoleIndex
int
getSpawnRoleIndex
()
Method getSpawnRoleIndex.
setSpawnRoleIndex
void
setSpawnRoleIndex
(int spawnRoleIndex)
Method setSpawnRoleIndex.
- Parameters:
intspawnRoleIndex
getBlockTypeBlackboardView
BlockTypeView
getBlockTypeBlackboardView
(@Nonnull final Ref ref, @Nonnull final Store store)
Method getBlockTypeBlackboardView.
- Parameters:
@Nonnull final Refref@Nonnull final Storestore
removeBlockTypeBlackboardView
Method removeBlockTypeBlackboardView.
initBlockTypeBlackboardView
void
initBlockTypeBlackboardView
(@Nonnull final Ref ref, final ComponentAccessor componentAccessor)
Method initBlockTypeBlackboardView.
- Parameters:
@Nonnull final Refreffinal ComponentAccessorcomponentAccessor
initBlockChangeBlackboardView
void
initBlockChangeBlackboardView
(@Nonnull final Ref ref, final ComponentAccessor componentAccessor)
Method initBlockChangeBlackboardView.
- Parameters:
@Nonnull final Refreffinal ComponentAccessorcomponentAccessor
addBlackboardBlockTypeSets
void
addBlackboardBlockTypeSets
(final IntList blackboardBlockSets)
Method addBlackboardBlockTypeSets.
- Parameters:
final IntListblackboardBlockSets
getBlackboardBlockTypeSets
IntList
getBlackboardBlockTypeSets
()
Method getBlackboardBlockTypeSets.
addBlackboardBlockChangeSets
void
addBlackboardBlockChangeSets
(@Nonnull final BlockEventType type, @Nonnull final IntSet sets)
Method addBlackboardBlockChangeSets.
- Parameters:
@Nonnull final BlockEventTypetype@Nonnull final IntSetsets
getBlackboardBlockChangeSet
Method getBlackboardBlockChangeSet.
- Parameters:
final BlockEventTypetype
getBlackboardBlockChangeSets
IntSet>
getBlackboardBlockChangeSets
()
Method getBlackboardBlockChangeSets.
notifyBlockChange
void
notifyBlockChange
(@Nonnull final BlockEventType type, @Nonnull final EventNotification notification)
Method notifyBlockChange.
- Parameters:
@Nonnull final BlockEventTypetype@Nonnull final EventNotificationnotification
addBlackboardEntityEventSets
void
addBlackboardEntityEventSets
(@Nonnull final EntityEventType type, @Nonnull final IntSet sets)
Method addBlackboardEntityEventSets.
- Parameters:
@Nonnull final EntityEventTypetype@Nonnull final IntSetsets
getBlackboardEntityEventSet
Method getBlackboardEntityEventSet.
- Parameters:
@Nonnull final EntityEventTypetype
getBlackboardEntityEventSets
IntSet>
getBlackboardEntityEventSets
()
Method getBlackboardEntityEventSets.
notifyEntityEvent
void
notifyEntityEvent
(@Nonnull final EntityEventType type, @Nonnull final EntityEventNotification notification)
Method notifyEntityEvent.
- Parameters:
@Nonnull final EntityEventTypetype@Nonnull final EntityEventNotificationnotification
setEnvironment
void
setEnvironment
(final int env)
Method setEnvironment.
- Parameters:
final intenv
getEnvironment
int
getEnvironment
()
Method getEnvironment.
getSpawnConfiguration
int
getSpawnConfiguration
()
Method getSpawnConfiguration.
setSpawnConfiguration
void
setSpawnConfiguration
(final int spawnConfigurationIndex)
Method setSpawnConfiguration.
- Parameters:
final intspawnConfigurationIndex
updateSpawnTrackingState
boolean
updateSpawnTrackingState
(final boolean newState)
Method updateSpawnTrackingState.
- Parameters:
final booleannewState
isDespawning
boolean
isDespawning
()
Method isDespawning.
isPlayingDespawnAnim
boolean
isPlayingDespawnAnim
()
Method isPlayingDespawnAnim.
getRoleDebugFlags
EnumSet
getRoleDebugFlags
()
Method getRoleDebugFlags.
setRoleDebugFlags
void
setRoleDebugFlags
(@Nonnull final EnumSet flags)
Method setRoleDebugFlags.
- Parameters:
@Nonnull final EnumSetflags
setSpawnInstant
void
setSpawnInstant
(@Nonnull final Instant spawned)
Method setSpawnInstant.
- Parameters:
@Nonnull final Instantspawned
getSpawnInstant
Instant
getSpawnInstant
()
Method getSpawnInstant.
setInventorySize
void
setInventorySize
(final int hotbarCapacity, final int inventoryCapacity, final int offHandCapacity)
Method setInventorySize.
- Parameters:
final inthotbarCapacityfinal intinventoryCapacityfinal intoffHandCapacity
getLegacyWorldgenId
int
getLegacyWorldgenId
()
Method getLegacyWorldgenId.
setAppearance
boolean
setAppearance
(@Nonnull final Ref ref, @Nonnull final String name, @Nonnull final ComponentAccessor componentAccessor)
Method setAppearance.
- Parameters:
@Nonnull final Refref@Nonnull final Stringname@Nonnull final ComponentAccessorcomponentAccessor
ModelComponent
new
ModelComponent
(model)
Method ModelComponent.
- Parameters:
modelmodel
getCurrentHorizontalSpeedMultiplier
float
getCurrentHorizontalSpeedMultiplier
(@Nullable final Ref ref, @Nullable final ComponentAccessor componentAccessor)
Method getCurrentHorizontalSpeedMultiplier.
- Parameters:
@Nullable final Refref@Nullable final ComponentAccessorcomponentAccessor
toString
String
toString
()
Method toString.
getNPCTypeId
String
getNPCTypeId
()
Method getNPCTypeId.
getNPCTypeIndex
int
getNPCTypeIndex
()
Method getNPCTypeIndex.
addReservation
void
addReservation
(@Nonnull final UUID playerUUID)
Method addReservation.
- Parameters:
@Nonnull final UUIDplayerUUID
removeReservation
void
removeReservation
(@Nonnull final UUID playerUUID)
Method removeReservation.
- Parameters:
@Nonnull final UUIDplayerUUID
isReserved
boolean
isReserved
()
Method isReserved.
isReservedBy
boolean
isReservedBy
(@Nonnull final UUID playerUUID)
Method isReservedBy.
- Parameters:
@Nonnull final UUIDplayerUUID