Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- build(BuilderSupport)
- getShortDescription()
- getLongDescription()
- getBuilderDescriptorState()
- readConfig(JsonElement)
- category()
- isEnabled(ExecutionContext)
- getIdentifier()
- canSpawn(SpawningContext)
- requiresSpawnDropHeightCheck(SpawningContext)
- getSpawnPlacement(SpawningContext)
- getMovementModes(SpawningContext, Set, Set, Set)
- validate(String, NPCLoadTimeValidationHelper, ExecutionContext, Scope, List)
Class BuilderMotionControllerMap
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.BuilderBase<Map<String, MotionController>>
com.hypixel.hytale.server.npc.movement.controllers.builders.BuilderMotionControllerMap
- All Implemented Interfaces:
NamedSchema, SchemaConvertable<Void>, Builder<Map<String, MotionController>>, BuilderContext, ISpawnable
public class BuilderMotionControllerMap
extends BuilderBase<Map<String, MotionController>>
implements ISpawnable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(BuilderSupport builderSupport) canSpawn(SpawningContext context) Called to test whether this spawnable class type is spawnable regarding the given contextcategory()voidgetMovementModes(SpawningContext context, Set<MovementMode> outSupportedMovementModes, Set<MovementMode> outDefaultMovementModes, Set<MovementMode> outSafeMovementModes) Query all movement mode sets for this spawnable.getSpawnPlacement(SpawningContext context) Query where a spawn position for this spawnable must sit for the movement mode in the context.final booleanisEnabled(ExecutionContext context) readConfig(com.google.gson.JsonElement data) booleanCalled to test whether a spawn drop height check applies to this spawnable for the given context.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 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
addDynamicDependency, clearDynamicDependencies, getDynamicDependencies, hasDynamicDependencies, isDeprecated, isSpawnableMethods inherited from interface BuilderContext
getBreadCrumbs, getBreadCrumbs, getParent, setCurrentStateNameMethods inherited from interface SchemaConvertable
toSchema
-
Constructor Details
-
BuilderMotionControllerMap
public BuilderMotionControllerMap()
-
-
Method Details
-
build
- Specified by:
buildin interfaceBuilder<Map<String, MotionController>>
-
getShortDescription
- Specified by:
getShortDescriptionin classBuilderBase<Map<String, MotionController>>
-
getLongDescription
- Specified by:
getLongDescriptionin classBuilderBase<Map<String, MotionController>>
-
getBuilderDescriptorState
- Specified by:
getBuilderDescriptorStatein interfaceBuilder<Map<String, MotionController>>- Specified by:
getBuilderDescriptorStatein classBuilderBase<Map<String, MotionController>>
-
readConfig
@Nonnull public Builder<Map<String, MotionController>> readConfig(@Nonnull com.google.gson.JsonElement data) - Overrides:
readConfigin classBuilderBase<Map<String, MotionController>>
-
category
- Specified by:
categoryin interfaceBuilder<Map<String, MotionController>>
-
isEnabled
- Specified by:
isEnabledin interfaceBuilder<Map<String, MotionController>>
-
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.
-
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<Map<String, MotionController>>- Overrides:
validatein classBuilderBase<Map<String, MotionController>>- 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
-