Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- isSpawnable()
- getShortDescription()
- getLongDescription()
- getBuilderDescriptorState()
- build(BuilderSupport)
- createAndAttach(Holder, BuilderSupport)
- validate(String, NPCLoadTimeValidationHelper, ExecutionContext, Scope, List)
- readConfig(JsonElement)
- getIdentifier()
- canSpawn(SpawningContext)
- requiresSpawnDropHeightCheck(SpawningContext)
- getSpawnPlacement(SpawningContext)
- getMovementModes(SpawningContext, Set, Set, Set)
- category()
- getSpawnModelName(ExecutionContext, Scope)
- createModifierScope(ExecutionContext)
- createExecutionScope()
- markNeedsReload()
- getSpawnParticles(BuilderSupport)
- getSpawnParticleOffset(BuilderSupport)
- getSpawnParticleTargetNode(BuilderSupport)
- isSpawnParticleDetached(BuilderSupport)
- getSpawnViewDistance()
- isEnabled(ExecutionContext)
- getMaxHealth(BuilderSupport)
- getDisplayNames()
- getHiddenUIComponents(BuilderSupport)
- getNameTranslationKey(BuilderSupport)
- getAppearance(BuilderSupport)
- breathesInAir(ExecutionContext, Scope)
- breathesInWater(ExecutionContext, Scope)
- getOpaqueBlockSet()
- getInertia()
- getKnockbackScale(BuilderSupport)
- useFixedKnockback(BuilderSupport)
- getHotbarItems(BuilderSupport)
- getOffHandItems(BuilderSupport)
- getInventoryItemsDropList(BuilderSupport)
- getArmor()
- isPickupDropOnDeath()
- getDropListId(BuilderSupport)
- getCollisionDistance()
- getCollisionForceFalloff()
- isAvoidingEntities()
- getAvoidanceMode(BuilderSupport)
- getSeparationMode(BuilderSupport)
- getSeparationSafeDistanceMultiplier(BuilderSupport)
- getSeparationLegacySteeringStrength(BuilderSupport)
- getSeparationPushSteeringStrength(BuilderSupport)
- getSeparationPushDistanceWeightDefault(BuilderSupport)
- getSeparationPushDistanceWeightTarget(BuilderSupport)
- getSeparationPushDistanceWeightAttacker(BuilderSupport)
- getSeparationPushSpeedScale(BuilderSupport)
- getOverrideUseOrientationHint(BuilderSupport)
- getOverrideAlwaysSeparate(BuilderSupport)
- getOverrideNormalizeDistances(BuilderSupport)
- getCollisionRadius()
- getSeparationDistance(BuilderSupport)
- getSeparationWeight(BuilderSupport)
- getSeparationDistanceTarget(BuilderSupport)
- getSeparationNearRadiusTarget(BuilderSupport)
- getSeparationFarRadiusTarget(BuilderSupport)
- isApplySeparation(BuilderSupport)
- isAvoidanceFallCheck(BuilderSupport)
- isStayingInEnvironment()
- getAllowedEnvironments()
- getEntityAvoidanceStrength()
- isOverridingHeadPitchAngle(BuilderSupport)
- getHeadPitchAngleRange(BuilderSupport)
- getFlockSpawnTypes(BuilderSupport)
- isFlockSpawnTypeRandom(BuilderSupport)
- getFlockAllowedRoles(BuilderSupport)
- isCanLeadFlock(BuilderSupport)
- getFlockWeightAlignment()
- getFlockWeightSeparation()
- getFlockWeightCohesion()
- getFlockInfluenceRange()
- getCollisionViewAngle()
- getBalanceAsset(BuilderSupport)
- getDeathAnimationTime(BuilderSupport)
- getDeathParticles(BuilderSupport)
- isDropDeathItemsInstantly(BuilderSupport)
- getDeathInteraction(BuilderSupport)
- getDespawnAnimationTime()
- isInvulnerable(BuilderSupport)
- isIgnoreDisableNPCIncomingDamage(BuilderSupport)
- getInventorySlots()
- getHotbarSlots()
- getOffHandSlots()
- getDefaultOffHandSlot(BuilderSupport)
- isCorpseStaysInFlock()
- getMotionControllerMap(BuilderSupport)
- getInitialMotionController(BuilderSupport)
- getInstructionList(BuilderSupport)
- getInteractionInstruction(BuilderSupport)
- getDeathInstruction(BuilderSupport)
- registerStateEvaluator(BuilderSupport)
- getInteractionVars(BuilderSupport)
- isMemory(ExecutionContext)
- isMemory(ExecutionContext, Scope)
- getMemoriesCategory(ExecutionContext, Scope)
- getMemoriesNameOverride(ExecutionContext)
- getMemoriesNameOverride(ExecutionContext, Scope)
- getMemoriesUnlockedBy(ExecutionContext)
- getMemoriesUnlockedBy(ExecutionContext, Scope)
- getMemoriesKillRange(ExecutionContext)
- getMemoriesKillRange(ExecutionContext, Scope)
- getNameTranslationKey(ExecutionContext, Scope)
- getSpawnLockTime(BuilderSupport)
Class BuilderRole
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.BuilderBase<Role>
com.hypixel.hytale.server.npc.asset.builder.DependencyTrackingBuilder<Role>
com.hypixel.hytale.server.npc.asset.builder.SupportConfigBuilder<Role>
com.hypixel.hytale.server.npc.role.builders.BuilderRole
- All Implemented Interfaces:
NamedSchema, SchemaConvertable<Void>, Builder<Role>, BuilderContext, RoleBuilder, SpawnEffect, ISpawnable, ISpawnableWithModel
- Direct Known Subclasses:
BuilderRoleAbstract
public class BuilderRole
extends SupportConfigBuilder<Role>
implements ISpawnableWithModel, SpawnEffect, RoleBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbreathesInAir(ExecutionContext context, Scope modifierScope) Return whether this spawnable can breathe in air.booleanbreathesInWater(ExecutionContext context, Scope modifierScope) Return whether this spawnable can breathe in water.build(BuilderSupport builderSupport) canSpawn(SpawningContext context) Called to test whether this spawnable class type is spawnable regarding the given contextcategory()createAndAttach(Holder<EntityStore> holder, BuilderSupport builderSupport) createModifierScope(ExecutionContext executionContext) getAppearance(BuilderSupport builderSupport) String[]getArmor()getAvoidanceMode(BuilderSupport builderSupport) getBalanceAsset(BuilderSupport support) doubledoubledoublefloatdoublegetDeathAnimationTime(BuilderSupport support) getDeathInstruction(BuilderSupport support) getDeathInteraction(BuilderSupport builderSupport) getDeathParticles(BuilderSupport support) bytegetDefaultOffHandSlot(BuilderSupport support) floatString[]getDropListId(BuilderSupport builderSupport) doubleString[]getFlockAllowedRoles(BuilderSupport support) doubleString[]getFlockSpawnTypes(BuilderSupport support) doubledoubledoublefloat[]getHeadPitchAngleRange(BuilderSupport support) String[]getHiddenUIComponents(BuilderSupport builderSupport) String[]getHotbarItems(BuilderSupport support) intdoublegetInitialMotionController(BuilderSupport support) getInstructionList(BuilderSupport support) getInteractionInstruction(BuilderSupport support) getInteractionVars(BuilderSupport support) getInventoryItemsDropList(BuilderSupport support) intdoublegetKnockbackScale(BuilderSupport support) intgetMaxHealth(BuilderSupport builderSupport) getMemoriesCategory(ExecutionContext context, Scope modifierScope) doublegetMemoriesKillRange(ExecutionContext context) doublegetMemoriesKillRange(ExecutionContext context, Scope modifierScope) getMemoriesNameOverride(ExecutionContext context) getMemoriesNameOverride(ExecutionContext context, Scope modifierScope) getMemoriesUnlockedBy(ExecutionContext context) getMemoriesUnlockedBy(ExecutionContext context, Scope modifierScope) getMotionControllerMap(BuilderSupport support) voidgetMovementModes(SpawningContext context, Set<MovementMode> outSupportedMovementModes, Set<MovementMode> outDefaultMovementModes, Set<MovementMode> outSafeMovementModes) Query all movement mode sets for this spawnable.getNameTranslationKey(BuilderSupport support) getNameTranslationKey(ExecutionContext context, Scope modifierScope) String[]getOffHandItems(BuilderSupport support) intintgetOverrideAlwaysSeparate(BuilderSupport builderSupport) getOverrideNormalizeDistances(BuilderSupport builderSupport) getOverrideUseOrientationHint(BuilderSupport builderSupport) doublegetSeparationDistance(BuilderSupport support) doubledoubledoublegetSeparationLegacySteeringStrength(BuilderSupport builderSupport) getSeparationMode(BuilderSupport builderSupport) doubledoublegetSeparationPushDistanceWeightAttacker(BuilderSupport builderSupport) doublegetSeparationPushDistanceWeightDefault(BuilderSupport builderSupport) doublegetSeparationPushDistanceWeightTarget(BuilderSupport builderSupport) doublegetSeparationPushSpeedScale(BuilderSupport builderSupport) doublegetSeparationPushSteeringStrength(BuilderSupport builderSupport) doublegetSeparationSafeDistanceMultiplier(BuilderSupport builderSupport) doublegetSeparationWeight(BuilderSupport support) floatgetSpawnLockTime(BuilderSupport support) getSpawnModelName(ExecutionContext context, Scope modifierScope) org.joml.Vector3dgetSpawnParticleOffset(BuilderSupport support) getSpawnParticles(BuilderSupport support) getSpawnParticleTargetNode(BuilderSupport support) getSpawnPlacement(SpawningContext context) Query where a spawn position for this spawnable must sit for the movement mode in the context.doublebooleanisApplySeparation(BuilderSupport support) booleanisAvoidanceFallCheck(BuilderSupport builderSupport) booleanbooleanisCanLeadFlock(BuilderSupport support) booleanbooleanisDropDeathItemsInstantly(BuilderSupport support) final booleanisEnabled(ExecutionContext context) booleanisFlockSpawnTypeRandom(BuilderSupport support) booleanbooleanisInvulnerable(BuilderSupport support) booleanisMemory(ExecutionContext context) booleanisMemory(ExecutionContext context, Scope modifierScope) booleanisOverridingHeadPitchAngle(BuilderSupport support) booleanbooleanbooleanisSpawnParticleDetached(BuilderSupport support) booleanvoidreadConfig(com.google.gson.JsonElement data) voidregisterStateEvaluator(BuilderSupport support) booleanCalled to test whether a spawn drop height check applies to this spawnable for the given context.booleanuseFixedKnockback(BuilderSupport support) booleanvalidate(String configName, NPCLoadTimeValidationHelper validationHelper, ExecutionContext context, Scope globalScope, List<String> errors) Iterates the builder tree and validates all present dynamic value holders based on the execution context and scope provided.Methods inherited from class SupportConfigBuilder
getAttitudeGroup, getBusyStates, getDebugFlags, getDefaultNPCAttitude, getDefaultPlayerAttitude, getDisableDamageGroups, getItemAttitudeGroup, getStartState, getStartStateIndex, getStartSubStateIndex, getStateTransitionController, isDisableDamageFlockMethods inherited from class DependencyTrackingBuilder
addDynamicDependency, clearDynamicDependencies, getDynamicDependencies, hasDynamicDependenciesMethods inherited from class BuilderBase
canRequireFeature, cleanupParameters, createVector3d, createVector3d, enumSetToStrings, excludeFromRegularBuilding, expectBooleanElement, expectKey, expectObject, expectObject, expectStringArray, expectStringArray, expectStringElement, getArray, getAsset, getAsset, getAssetArray, getAssetArray, getBoolean, getBoolean, getBuilderManager, getBuilderParameters, getCodecObject, getDependencies, getDescriptionArray, getDescriptor, getDictionary, getDomain, getDouble, getDouble, getDoubleArray, getDoubleArray, getDoubleRange, getDoubleRange, getEnum, getEnum, getEnumSet, getEnumSet, getEvaluatorHelper, getFloat, getFloat, getInstructionContextHelper, getInt, getInt, getIntArray, getIntArray, getIntRange, getIntRange, getLabel, getObject, getOverride, getOverride, getOwner, getParameterBlock, getSchemaName, getStateMappingHelper, getString, getString, getStringArray, getStringArray, getTypeName, getVector3d, getVector3d, ignoreAttribute, readBoolean, readCommonConfig, readConfig, readString, readString, readStringArray, readStringArray, registerTags, requireArray, requireArray, requireAsset, requireAsset, requireAssetArray, requireAssetArray, requireBoolean, requireBoolean, requireCodecObject, requireDictionary, requireDouble, requireDouble, requireDoubleArray, requireDoubleArray, requireDoubleIfNotOverridden, requireDoubleRange, requireDoubleRange, requireEmbeddableArray, requireEnum, requireEnum, requireEnumArray, requireEnumSet, requireEnumSet, requireFloat, requireFloat, requireInt, requireInt, requireIntArray, requireIntArray, requireIntIfNotOverridden, requireIntRange, requireIntRange, requireObject, requireString, requireString, requireStringArray, requireStringArray, requireStringIfNotOverridden, requireTemporalArray, requireTemporalRange, requireVector3d, requireVector3d, setLabel, setTypeName, stringsToEnumArray, stringsToEnumSet, stringToEnum, toSchema, validateAsset, validateAssetList, validateReferencedProvidedFeaturesMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
isDeprecatedMethods inherited from interface BuilderContext
getBreadCrumbs, getBreadCrumbs, getParent, setCurrentStateNameMethods inherited from interface SchemaConvertable
toSchemaMethods inherited from interface SpawnEffect
spawnEffect
-
Constructor Details
-
BuilderRole
public BuilderRole()
-
-
Method Details
-
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceBuilder<Role>
-
getShortDescription
- Specified by:
getShortDescriptionin classBuilderBase<Role>
-
getLongDescription
- Specified by:
getLongDescriptionin classBuilderBase<Role>
-
getBuilderDescriptorState
- Specified by:
getBuilderDescriptorStatein interfaceBuilder<Role>- Specified by:
getBuilderDescriptorStatein classBuilderBase<Role>
-
build
-
createAndAttach
@Nonnull public Role createAndAttach(@Nonnull Holder<EntityStore> holder, @Nonnull BuilderSupport builderSupport) - Specified by:
createAndAttachin interfaceRoleBuilder
-
validate
public boolean validate(String configName, @Nonnull NPCLoadTimeValidationHelper validationHelper, @Nonnull ExecutionContext context, Scope globalScope, @Nonnull List<String> errors) Description copied from interface:BuilderIterates the builder tree and validates all present dynamic value holders based on the execution context and scope provided. Will also run an optional ILoadTimeValidationHelper- Specified by:
validatein interfaceBuilder<Role>- Overrides:
validatein classBuilderBase<Role>- Parameters:
configName- the name of the parent file from which the execution context and scope are derivedvalidationHelper- an optional validation helper that will be run in certain contexts depending on implementationscontext- the execution context for resolving value holdersglobalScope- the scope for resolving value holderserrors- a list for storing any errors encountered- Returns:
- false if any errors were encountered during validation, true otherwise
-
readConfig
- Overrides:
readConfigin classSupportConfigBuilder<Role>
-
getIdentifier
- Specified by:
getIdentifierin interfaceISpawnable- Returns:
- the unique identifier of the spawnable class type
-
canSpawn
Description copied from interface:ISpawnableCalled to test whether this spawnable class type is spawnable regarding the given context- Specified by:
canSpawnin interfaceISpawnable- Parameters:
context- TheSpawningContextto test against- Returns:
trueif this spawnable can spawn,falseif otherwise
-
requiresSpawnDropHeightCheck
Description copied from interface:ISpawnableCalled to test whether a spawn drop height check applies to this spawnable for the given context.The motion controller that supports the movement mode in the context resolves the answer. An implementation that cannot resolve it returns
true, so the caller keeps the check.- Specified by:
requiresSpawnDropHeightCheckin interfaceISpawnable- Parameters:
context- TheSpawningContextto test against- Returns:
trueif the caller must check the spawn drop height,falseif otherwise
-
getSpawnPlacement
Description copied from interface:ISpawnableQuery where a spawn position for this spawnable must sit for the movement mode in the context.The motion controller that supports the movement mode in the context resolves the answer. An implementation that cannot resolve it returns
SpawnPositionPlacement.ON_GROUND.A position search uses the answer to place its candidates. The spawnable still judges the finished candidate in
ISpawnable.canSpawn(SpawningContext).- Specified by:
getSpawnPlacementin interfaceISpawnable- Parameters:
context- TheSpawningContextto test against- Returns:
- the placement a spawn position must have
-
getMovementModes
public void getMovementModes(@Nonnull SpawningContext context, @Nonnull Set<MovementMode> outSupportedMovementModes, @Nonnull Set<MovementMode> outDefaultMovementModes, @Nonnull Set<MovementMode> outSafeMovementModes) Description copied from interface:ISpawnableQuery all movement mode sets for this spawnable.- Specified by:
getMovementModesin interfaceISpawnable- Parameters:
context- TheSpawningContextto test againstoutSupportedMovementModes- Populated with every movement mode the NPC's motion controller is capable of. Must be cleared before population.outDefaultMovementModes- Populated with the movement modes used when no user configuration is present. Must be cleared before population.outSafeMovementModes- Populated with movement modes the NPC can use safely given its breathing configuration (e.g. air-breathing walkers exclude UNDERWATER_WALK). Must be cleared before population.
-
category
-
getSpawnModelName
- Specified by:
getSpawnModelNamein interfaceISpawnableWithModel
-
createModifierScope
- Specified by:
createModifierScopein interfaceISpawnableWithModel
-
createExecutionScope
- Specified by:
createExecutionScopein interfaceISpawnableWithModel
-
markNeedsReload
public void markNeedsReload()- Specified by:
markNeedsReloadin interfaceISpawnableWithModel
-
getSpawnParticles
- Specified by:
getSpawnParticlesin interfaceSpawnEffect
-
getSpawnParticleOffset
- Specified by:
getSpawnParticleOffsetin interfaceSpawnEffect
-
getSpawnParticleTargetNode
- Specified by:
getSpawnParticleTargetNodein interfaceSpawnEffect
-
isSpawnParticleDetached
- Specified by:
isSpawnParticleDetachedin interfaceSpawnEffect
-
getSpawnViewDistance
public double getSpawnViewDistance()- Specified by:
getSpawnViewDistancein interfaceSpawnEffect
-
isEnabled
-
getMaxHealth
-
getDisplayNames
-
getHiddenUIComponents
-
getNameTranslationKey
-
getAppearance
-
breathesInAir
Description copied from interface:ISpawnableWithModelReturn whether this spawnable can breathe in air. Defaults totruematching the standard role default.- Specified by:
breathesInAirin interfaceISpawnableWithModel
-
breathesInWater
Description copied from interface:ISpawnableWithModelReturn whether this spawnable can breathe in water. Defaults tofalsematching the standard role default.- Specified by:
breathesInWaterin interfaceISpawnableWithModel
-
getOpaqueBlockSet
public int getOpaqueBlockSet() -
getInertia
public double getInertia() -
getKnockbackScale
-
useFixedKnockback
-
getHotbarItems
-
getOffHandItems
-
getInventoryItemsDropList
-
getArmor
-
isPickupDropOnDeath
public boolean isPickupDropOnDeath() -
getDropListId
-
getCollisionDistance
public double getCollisionDistance() -
getCollisionForceFalloff
public double getCollisionForceFalloff() -
isAvoidingEntities
public boolean isAvoidingEntities() -
getAvoidanceMode
-
getSeparationMode
-
getSeparationSafeDistanceMultiplier
-
getSeparationLegacySteeringStrength
-
getSeparationPushSteeringStrength
-
getSeparationPushDistanceWeightDefault
-
getSeparationPushDistanceWeightTarget
-
getSeparationPushDistanceWeightAttacker
-
getSeparationPushSpeedScale
-
getOverrideUseOrientationHint
-
getOverrideAlwaysSeparate
-
getOverrideNormalizeDistances
-
getCollisionRadius
public double getCollisionRadius() -
getSeparationDistance
-
getSeparationWeight
-
getSeparationDistanceTarget
-
getSeparationNearRadiusTarget
-
getSeparationFarRadiusTarget
-
isApplySeparation
-
isAvoidanceFallCheck
-
isStayingInEnvironment
public boolean isStayingInEnvironment() -
getAllowedEnvironments
-
getEntityAvoidanceStrength
public double getEntityAvoidanceStrength() -
isOverridingHeadPitchAngle
-
getHeadPitchAngleRange
-
getFlockSpawnTypes
-
isFlockSpawnTypeRandom
-
getFlockAllowedRoles
-
isCanLeadFlock
-
getFlockWeightAlignment
public double getFlockWeightAlignment() -
getFlockWeightSeparation
public double getFlockWeightSeparation() -
getFlockWeightCohesion
public double getFlockWeightCohesion() -
getFlockInfluenceRange
public double getFlockInfluenceRange() -
getCollisionViewAngle
public float getCollisionViewAngle() -
getBalanceAsset
-
getDeathAnimationTime
-
getDeathParticles
-
isDropDeathItemsInstantly
-
getDeathInteraction
-
getDespawnAnimationTime
public float getDespawnAnimationTime() -
isInvulnerable
-
isIgnoreDisableNPCIncomingDamage
-
getInventorySlots
public int getInventorySlots() -
getHotbarSlots
public int getHotbarSlots() -
getOffHandSlots
public int getOffHandSlots() -
getDefaultOffHandSlot
-
isCorpseStaysInFlock
public boolean isCorpseStaysInFlock() -
getMotionControllerMap
@Nullable public Map<String, MotionController> getMotionControllerMap(@Nonnull BuilderSupport support) -
getInitialMotionController
-
getInstructionList
-
getInteractionInstruction
-
getDeathInstruction
-
registerStateEvaluator
-
getInteractionVars
-
isMemory
-
isMemory
- Specified by:
isMemoryin interfaceISpawnableWithModel
-
getMemoriesCategory
- Specified by:
getMemoriesCategoryin interfaceISpawnableWithModel
-
getMemoriesNameOverride
-
getMemoriesNameOverride
- Specified by:
getMemoriesNameOverridein interfaceISpawnableWithModel
-
getMemoriesUnlockedBy
-
getMemoriesUnlockedBy
public Role.MemoriesUnlockMethod getMemoriesUnlockedBy(ExecutionContext context, @Nullable Scope modifierScope) - Specified by:
getMemoriesUnlockedByin interfaceISpawnableWithModel
-
getMemoriesKillRange
-
getMemoriesKillRange
- Specified by:
getMemoriesKillRangein interfaceISpawnableWithModel
-
getNameTranslationKey
@Nonnull public String getNameTranslationKey(ExecutionContext context, @Nullable Scope modifierScope) - Specified by:
getNameTranslationKeyin interfaceISpawnableWithModel
-
getSpawnLockTime
-