Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getShortDescription()
- getLongDescription()
- getBuilderDescriptorState()
- build(BuilderSupport)
- readConfig(JsonElement)
- category()
- getType()
- getMinHorizontalSpeed()
- getAcceleration()
- getMaxVerticalSpeed()
- getGravity()
- getMaxFallSpeed()
- getMaxSinkSpeed()
- getMaxMoveTurnAngle()
- getMaxRotationSpeed()
- getMinDiveDepth()
- getMaxDiveDepth()
- getMinWaterDepth()
- getMaxWaterDepth()
- getMinDepthAboveGround()
- getMinDepthBelowSurface()
- getSwimDepth()
- getSinkRatio()
- getFastDiveThreshold()
- getDesiredDepthWeight()
- canSpawn(SpawningContext)
- requiresSpawnDropHeightCheck(SpawningContext)
- getSpawnPlacement(SpawningContext)
- getMovementModes(SpawningContext, Set, Set, Set)
- getClassType()
- getSupportedMovementModes()
Class BuilderMotionControllerDive
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.BuilderBase<MotionController>
com.hypixel.hytale.server.npc.asset.builder.BuilderBaseWithType<MotionController>
com.hypixel.hytale.server.npc.movement.controllers.builders.BuilderMotionControllerBase
com.hypixel.hytale.server.npc.movement.controllers.builders.BuilderMotionControllerDive
- All Implemented Interfaces:
NamedSchema, SchemaConvertable<Void>, Builder<MotionController>, BuilderContext, 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()doubleClass<? extends MotionController> doubledoubledoubledoubledoublefloatdoubledoubledoubledoubledoubledoubledoubledoubledoublevoidgetMovementModes(SpawningContext context, Set<MovementMode> outSupportedMovementModes, Set<MovementMode> outDefaultMovementModes, Set<MovementMode> outSafeMovementModes) Query all movement mode sets for this spawnable.doublegetSpawnPlacement(SpawningContext context) Query where a spawn position for this spawnable must sit for the movement mode in the context.Return the set ofMovementModes this motion controller supports.doublegetType()readConfig(com.google.gson.JsonElement data) booleanCalled to test whether a spawn drop height check applies to this spawnable for the given context.Methods inherited from class BuilderMotionControllerBase
getEpsilonAngle, getEpsilonSpeed, getExternalVelocityDamping, getFastHorizontalThreshold, getFastHorizontalThresholdRange, getIdentifier, getMaxHeadRotationSpeed, getMaxHorizontalSpeed, isEnabled, readCommonConfig, validateMethods 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, 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
-
BuilderMotionControllerDive
public BuilderMotionControllerDive()
-
-
Method Details
-
getShortDescription
- Specified by:
getShortDescriptionin classBuilderBase<MotionController>
-
getLongDescription
- Specified by:
getLongDescriptionin classBuilderBase<MotionController>
-
getBuilderDescriptorState
- Specified by:
getBuilderDescriptorStatein interfaceBuilder<MotionController>- Specified by:
getBuilderDescriptorStatein classBuilderBase<MotionController>
-
build
-
readConfig
- Overrides:
readConfigin classBuilderBase<MotionController>
-
category
-
getType
- Overrides:
getTypein classBuilderBaseWithType<MotionController>
-
getMinHorizontalSpeed
public double getMinHorizontalSpeed() -
getAcceleration
public double getAcceleration() -
getMaxVerticalSpeed
public double getMaxVerticalSpeed() -
getGravity
public double getGravity() -
getMaxFallSpeed
public double getMaxFallSpeed() -
getMaxSinkSpeed
public double getMaxSinkSpeed() -
getMaxMoveTurnAngle
public float getMaxMoveTurnAngle() -
getMaxRotationSpeed
public double getMaxRotationSpeed() -
getMinDiveDepth
public double getMinDiveDepth() -
getMaxDiveDepth
public double getMaxDiveDepth() -
getMinWaterDepth
public double getMinWaterDepth() -
getMaxWaterDepth
public double getMaxWaterDepth() -
getMinDepthAboveGround
public double getMinDepthAboveGround() -
getMinDepthBelowSurface
public double getMinDepthBelowSurface() -
getSwimDepth
public double getSwimDepth() -
getSinkRatio
public double getSinkRatio() -
getFastDiveThreshold
public double getFastDiveThreshold() -
getDesiredDepthWeight
public double getDesiredDepthWeight() -
canSpawn
Description copied from interface:ISpawnableCalled to test whether this spawnable class type is spawnable regarding the given context- 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.- 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).- 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.- 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.
-
getClassType
- Specified by:
getClassTypein classBuilderMotionControllerBase
-
getSupportedMovementModes
Description copied from class:BuilderMotionControllerBaseReturn the set ofMovementModes this motion controller supports.Implementations must return the static constant defined on their corresponding
MotionControllersubclass (e.g.MotionControllerWalk.SUPPORTED_MOVEMENT_MODES). The returned set is immutable and context-independent.- Specified by:
getSupportedMovementModesin classBuilderMotionControllerBase
-