Class NPCEntity
java.lang.Object
com.hypixel.hytale.server.core.entity.Entity
com.hypixel.hytale.server.core.entity.LivingEntity
com.hypixel.hytale.server.npc.entities.NPCEntity
- All Implemented Interfaces:
Component<EntityStore>,INonPlayerCharacter,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.server.core.entity.Entity
Entity.DefaultAnimations -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AlarmStoreprivate Map<BlockEventType, it.unimi.dsi.fastutil.ints.IntSet> private BlockEventViewprivate it.unimi.dsi.fastutil.ints.IntListprivate BlockTypeViewprivate Map<EntityEventType, it.unimi.dsi.fastutil.ints.IntSet> private EntityEventViewprivate floatstatic final BuilderCodec<NPCEntity> private final DamageDataprivate floatprivate floatprivate floatprivate intprivate booleanprivate doubleprivate floatprivate floatprivate booleanprivate booleanprivate booleanprivate floatprivate floatprivate final Vector3dprivate final Vector3dprivate PathManagerprivate Roleprivate intprivate Stringprivate intprivate Stringprivate Instantprivate intprivate Stringprivate intDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class com.hypixel.hytale.server.core.entity.LivingEntity
currentFallDistance, DEFAULT_ITEM_THROW_SPEEDFields inherited from class com.hypixel.hytale.server.core.entity.Entity
DISPLAY_NAME, legacyDisplayName, legacyUuid, LOGGER, MODEL, networkId, reference, removedBy, UNASSIGNED_ID, UUID, VERSION, wasRemoved, worldFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlackboardBlockChangeSets(BlockEventType type, it.unimi.dsi.fastutil.ints.IntSet sets) voidaddBlackboardBlockTypeSets(it.unimi.dsi.fastutil.ints.IntList blackboardBlockSets) voidaddBlackboardEntityEventSets(EntityEventType type, it.unimi.dsi.fastutil.ints.IntSet sets) voidaddReservation(UUID playerUUID) booleancanBreathe(Ref<EntityStore> ref, BlockMaterial breathingMaterial, int fluidId, ComponentAccessor<EntityStore> componentAccessor) voidprotected Inventoryit.unimi.dsi.fastutil.ints.IntSetMap<BlockEventType, it.unimi.dsi.fastutil.ints.IntSet> it.unimi.dsi.fastutil.ints.IntListit.unimi.dsi.fastutil.ints.IntSetMap<EntityEventType, it.unimi.dsi.fastutil.ints.IntSet> getBlockTypeBlackboardView(Ref<EntityStore> ref, Store<EntityStore> store) booleangetCanCauseDamage(Ref<EntityStore> attackerRef, ComponentAccessor<EntityStore> componentAccessor) static ComponentType<EntityStore, NPCEntity> floatgetCurrentHorizontalSpeedMultiplier(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) doubleintdoublefloatfloatfloatintDeprecated, for removal: This API element is subject to removal in a future version.intgetRole()intintintvoidinitBlockChangeBlackboardView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidinitBlockTypeBlackboardView(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidbooleanbooleanbooleanbooleanisReservedBy(UUID playerUUID) voidnotifyBlockChange(BlockEventType type, EventNotification notification) voidnotifyEntityEvent(EntityEventType type, EntityEventNotification notification) voidonFlockSetState(Ref<EntityStore> ref, String state, String subState, ComponentAccessor<EntityStore> componentAccessor) voidonFlockSetTarget(String targetSlot, Ref<EntityStore> target) voidplayAnimation(Ref<EntityStore> ref, AnimationSlot animationSlot, String animationId, ComponentAccessor<EntityStore> componentAccessor) voidremoveReservation(UUID playerUUID) booleanvoidvoidsaveLeashInformation(Vector3d position, Vector3f rotation) voidsetAppearance(Ref<EntityStore> ref, ModelAsset modelAsset, ComponentAccessor<EntityStore> componentAccessor) static booleansetAppearance(Ref<EntityStore> ref, String name, ComponentAccessor<EntityStore> componentAccessor) voidsetDespawnAnimationRemainingSeconds(float seconds) voidsetDespawnCheckRemainingSeconds(float seconds) voidsetDespawning(boolean despawning) voidsetDespawnRemainingSeconds(float seconds) voidsetDespawnTime(float time) voidsetEnvironment(int env) voidsetHoverHeight(double hoverHeight) voidsetHoverPhase(float hoverPhase) voidsetInitialModelScale(float scale) voidsetInventorySize(int hotbarCapacity, int inventoryCapacity, int offHandCapacity) voidsetLeashHeading(float leashHeading) voidsetLeashPitch(float leashPitch) voidsetLeashPoint(Vector3d leashPoint) voidsetPlayingDespawnAnim(boolean playingDespawnAnim) voidvoidsetRoleDebugFlags(EnumSet<RoleDebugFlags> flags) voidsetRoleIndex(int roleIndex) voidsetRoleName(String roleName) voidsetSpawnConfiguration(int spawnConfigurationIndex) voidsetSpawnInstant(Instant spawned) voidsetSpawnRoleIndex(int spawnRoleIndex) voidvoidstoreTickStartPosition(Vector3d position) booleantickDespawnAnimationRemainingSeconds(float dt) booleantickDespawnCheckRemainingSeconds(float dt) booleantickDespawnRemainingSeconds(float dt) toString()booleanupdateSpawnTrackingState(boolean newState) Methods inherited from class com.hypixel.hytale.server.core.entity.LivingEntity
canApplyItemStackPenalties, canDecreaseItemStackDurability, consumeEquipmentNetworkOutdated, decreaseItemStackDurability, getCurrentFallDistance, getInventory, getPackedMaterialAndFluidAtBreathingHeight, getStatModifiersManager, invalidateEquipmentNetwork, moveTo, setCurrentFallDistance, setInventory, setInventory, setInventory, updateItemStackDurabilityMethods inherited from class com.hypixel.hytale.server.core.entity.Entity
clearReference, clone, equals, getLegacyDisplayName, getNetworkId, getReference, getTransformComponent, getUuid, getWorld, hashCode, isCollidable, isHiddenFromLivingEntity, loadIntoWorld, markNeedsSave, remove, setLegacyUUID, setReference, setTransformComponent, toHolder, unloadFromWorld, wasRemovedMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
CODEC
-
roleName
-
roleIndex
private int roleIndex -
role
-
spawnRoleIndex
private int spawnRoleIndex -
spawnRoleName
-
spawnConfigurationName
-
environmentIndex
private int environmentIndex -
spawnConfigurationIndex
private int spawnConfigurationIndex -
isSpawnTracked
private boolean isSpawnTracked -
isDespawning
private boolean isDespawning -
isPlayingDespawnAnim
private boolean isPlayingDespawnAnim -
despawnRemainingSeconds
private float despawnRemainingSeconds -
despawnCheckRemainingSeconds
private float despawnCheckRemainingSeconds -
despawnAnimationRemainingSeconds
private float despawnAnimationRemainingSeconds -
cachedEntityHorizontalSpeedMultiplier
private float cachedEntityHorizontalSpeedMultiplier -
leashPoint
-
leashHeading
private float leashHeading -
leashPitch
private float leashPitch -
hasLeashPosition
private boolean hasLeashPosition -
hoverPhase
private float hoverPhase -
hoverHeight
private double hoverHeight -
initialModelScale
private float initialModelScale -
spawnInstant
-
pathManager
-
damageData
-
blackboardBlockTypeView
-
blackboardBlockTypeSets
private it.unimi.dsi.fastutil.ints.IntList blackboardBlockTypeSets -
blackboardBlockChangeView
-
blackboardBlockChangeSets
-
blackboardEntityEventView
-
blackboardEntityEventSets
-
alarmStore
-
worldgenId
Deprecated, for removal: This API element is subject to removal in a future version. -
reservedBy
-
oldPosition
-
-
Constructor Details
-
NPCEntity
public NPCEntity() -
NPCEntity
-
-
Method Details
-
getComponentType
-
getAlarmStore
-
createDefaultInventory
- Specified by:
createDefaultInventoryin classLivingEntity
-
getRole
-
invalidateCachedHorizontalSpeedMultiplier
public void invalidateCachedHorizontalSpeedMultiplier() -
storeTickStartPosition
-
tickDespawnAnimationRemainingSeconds
public boolean tickDespawnAnimationRemainingSeconds(float dt) -
setDespawnAnimationRemainingSeconds
public void setDespawnAnimationRemainingSeconds(float seconds) -
tickDespawnRemainingSeconds
public boolean tickDespawnRemainingSeconds(float dt) -
setDespawnRemainingSeconds
public void setDespawnRemainingSeconds(float seconds) -
setDespawning
public void setDespawning(boolean despawning) -
setPlayingDespawnAnim
public void setPlayingDespawnAnim(boolean playingDespawnAnim) -
tickDespawnCheckRemainingSeconds
public boolean tickDespawnCheckRemainingSeconds(float dt) -
setDespawnCheckRemainingSeconds
public void setDespawnCheckRemainingSeconds(float seconds) -
setInitialModelScale
public void setInitialModelScale(float scale) -
getOldPosition
-
playAnimation
public void playAnimation(@Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot, @Nullable String animationId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
clearDamageData
public void clearDamageData() -
setToDespawn
public void setToDespawn() -
setDespawnTime
public void setDespawnTime(float time) -
getDespawnTime
public double getDespawnTime() -
canBreathe
public boolean canBreathe(@Nonnull Ref<EntityStore> ref, @Nonnull BlockMaterial breathingMaterial, int fluidId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
canBreathein classLivingEntity
-
getDamageData
-
getCanCauseDamage
public boolean getCanCauseDamage(@Nonnull Ref<EntityStore> attackerRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onFlockSetState
public void onFlockSetState(@Nonnull Ref<EntityStore> ref, @Nonnull String state, @Nullable String subState, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onFlockSetTarget
-
saveLeashInformation
-
saveLeashBlockType
public void saveLeashBlockType() -
requiresLeashPosition
public boolean requiresLeashPosition() -
getLeashPoint
-
setLeashPoint
-
getLeashHeading
public float getLeashHeading() -
setLeashHeading
public void setLeashHeading(float leashHeading) -
getLeashPitch
public float getLeashPitch() -
setLeashPitch
public void setLeashPitch(float leashPitch) -
getHoverPhase
public float getHoverPhase() -
setHoverPhase
public void setHoverPhase(float hoverPhase) -
getHoverHeight
public double getHoverHeight() -
setHoverHeight
public void setHoverHeight(double hoverHeight) -
getRoleName
-
setRoleName
-
getRoleIndex
public int getRoleIndex() -
setRoleIndex
public void setRoleIndex(int roleIndex) -
setRole
-
getSpawnRoleIndex
public int getSpawnRoleIndex() -
setSpawnRoleIndex
public void setSpawnRoleIndex(int spawnRoleIndex) -
getBlockTypeBlackboardView
@Nonnull public BlockTypeView getBlockTypeBlackboardView(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store) -
removeBlockTypeBlackboardView
-
initBlockTypeBlackboardView
public void initBlockTypeBlackboardView(@Nonnull Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
initBlockChangeBlackboardView
public void initBlockChangeBlackboardView(@Nonnull Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) -
addBlackboardBlockTypeSets
public void addBlackboardBlockTypeSets(it.unimi.dsi.fastutil.ints.IntList blackboardBlockSets) -
getBlackboardBlockTypeSets
public it.unimi.dsi.fastutil.ints.IntList getBlackboardBlockTypeSets() -
addBlackboardBlockChangeSets
public void addBlackboardBlockChangeSets(@Nonnull BlockEventType type, @Nonnull it.unimi.dsi.fastutil.ints.IntSet sets) -
getBlackboardBlockChangeSet
-
getBlackboardBlockChangeSets
-
notifyBlockChange
public void notifyBlockChange(@Nonnull BlockEventType type, @Nonnull EventNotification notification) -
addBlackboardEntityEventSets
public void addBlackboardEntityEventSets(@Nonnull EntityEventType type, @Nonnull it.unimi.dsi.fastutil.ints.IntSet sets) -
getBlackboardEntityEventSet
-
getBlackboardEntityEventSets
-
notifyEntityEvent
public void notifyEntityEvent(@Nonnull EntityEventType type, @Nonnull EntityEventNotification notification) -
setEnvironment
public void setEnvironment(int env) -
getEnvironment
public int getEnvironment() -
getSpawnConfiguration
public int getSpawnConfiguration() -
setSpawnConfiguration
public void setSpawnConfiguration(int spawnConfigurationIndex) -
updateSpawnTrackingState
public boolean updateSpawnTrackingState(boolean newState) -
isDespawning
public boolean isDespawning() -
isPlayingDespawnAnim
public boolean isPlayingDespawnAnim() -
getRoleDebugFlags
-
setRoleDebugFlags
-
setSpawnInstant
-
getSpawnInstant
-
setInventorySize
public void setInventorySize(int hotbarCapacity, int inventoryCapacity, int offHandCapacity) -
getLegacyWorldgenId
Deprecated, for removal: This API element is subject to removal in a future version. -
getPathManager
-
setAppearance
public static boolean setAppearance(@Nonnull Ref<EntityStore> ref, @Nonnull String name, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setAppearance
public void setAppearance(@Nonnull Ref<EntityStore> ref, @Nonnull ModelAsset modelAsset, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getCurrentHorizontalSpeedMultiplier
public float getCurrentHorizontalSpeedMultiplier(@Nullable Ref<EntityStore> ref, @Nullable ComponentAccessor<EntityStore> componentAccessor) -
toString
- Overrides:
toStringin classLivingEntity
-
getNPCTypeId
- Specified by:
getNPCTypeIdin interfaceINonPlayerCharacter
-
getNPCTypeIndex
public int getNPCTypeIndex()- Specified by:
getNPCTypeIndexin interfaceINonPlayerCharacter
-
addReservation
-
removeReservation
-
isReserved
public boolean isReserved() -
isReservedBy
-