Class BuilderMotionControllerWalk

All Implemented Interfaces:
NamedSchema, SchemaConvertable<Void>, Builder<MotionController>, BuilderContext, ISpawnable

public class BuilderMotionControllerWalk extends BuilderMotionControllerBase
  • Constructor Details

    • BuilderMotionControllerWalk

      public BuilderMotionControllerWalk()
  • Method Details

    • build

      @Nonnull public MotionControllerWalk build(@Nonnull BuilderSupport builderSupport)
    • getShortDescription

      @Nonnull public String getShortDescription()
      Specified by:
      getShortDescription in class BuilderBase<MotionController>
    • getLongDescription

      @Nonnull public String getLongDescription()
      Specified by:
      getLongDescription in class BuilderBase<MotionController>
    • getBuilderDescriptorState

      @Nonnull public BuilderDescriptorState getBuilderDescriptorState()
      Specified by:
      getBuilderDescriptorState in interface Builder<MotionController>
      Specified by:
      getBuilderDescriptorState in class BuilderBase<MotionController>
    • readConfig

      @Nonnull public BuilderMotionControllerWalk readConfig(@Nonnull com.google.gson.JsonElement data)
      Overrides:
      readConfig in class BuilderBase<MotionController>
    • category

      @Nonnull public Class<MotionController> category()
    • getType

      @Nonnull public String getType()
      Overrides:
      getType in class BuilderBaseWithType<MotionController>
    • getMinHorizontalSpeed

      public double getMinHorizontalSpeed(@Nonnull BuilderSupport builderSupport)
    • getAcceleration

      public double getAcceleration(@Nonnull BuilderSupport builderSupport)
    • getMaxVerticalSpeed

      public double getMaxVerticalSpeed(@Nonnull BuilderSupport builderSupport)
    • getMaxVerticalSpeedFluid

      public double getMaxVerticalSpeedFluid(@Nonnull BuilderSupport builderSupport)
    • getGravity

      public double getGravity(@Nonnull BuilderSupport builderSupport)
    • getMaxMoveTurnAngle

      public float getMaxMoveTurnAngle(@Nonnull BuilderSupport builderSupport)
    • getMaxRotationSpeed

      public double getMaxRotationSpeed(@Nonnull BuilderSupport builderSupport)
    • getBlendRestTurnAngle

      public float getBlendRestTurnAngle(@Nonnull BuilderSupport builderSupport)
    • getBlendRestRelativeSpeed

      public double getBlendRestRelativeSpeed(@Nonnull BuilderSupport builderSupport)
    • getMaxClimbHeight

      public double getMaxClimbHeight(@Nonnull BuilderSupport support)
    • getClimbSpeedMult

      public double getClimbSpeedMult(BuilderSupport support)
    • getClimbSpeedPow

      public double getClimbSpeedPow(BuilderSupport support)
    • getClimbSpeedConst

      public double getClimbSpeedConst(BuilderSupport support)
    • getDescendForwardAmount

      public double getDescendForwardAmount(@Nonnull BuilderSupport builderSupport)
    • getDescendSpeedCompensation

      public double getDescendSpeedCompensation(@Nonnull BuilderSupport builderSupport)
    • getMaxDropHeight

      public double getMaxDropHeight(@Nonnull BuilderSupport support)
    • getMaxDropHeightRelaxedAdjustment

      public double getMaxDropHeightRelaxedAdjustment(@Nonnull BuilderSupport support)
    • getFenceBlockSet

      public int getFenceBlockSet(@Nonnull BuilderSupport support)
    • getMinHover

      public double getMinHover(@Nonnull BuilderSupport builderSupport)
    • getMaxHover

      public double getMaxHover(@Nonnull BuilderSupport builderSupport)
    • getHoverFreq

      public float getHoverFreq(@Nonnull BuilderSupport builderSupport)
    • getMinHoverClimb

      public double getMinHoverClimb(@Nonnull BuilderSupport builderSupport)
    • getMinHoverDrop

      public double getMinHoverDrop(@Nonnull BuilderSupport builderSupport)
    • isFloatsDown

      public boolean isFloatsDown(@Nonnull BuilderSupport builderSupport)
    • getMaxWalkSpeedAfterHitMultiplier

      public double getMaxWalkSpeedAfterHitMultiplier(@Nonnull BuilderSupport builderSupport)
    • getJumpHeight

      public double getJumpHeight(@Nonnull BuilderSupport support)
    • getMinJumpHeight

      public double getMinJumpHeight(@Nonnull BuilderSupport support)
    • getMinJumpDistance

      public double getMinJumpDistance(@Nonnull BuilderSupport support)
    • getJumpForce

      public double getJumpForce(@Nonnull BuilderSupport support)
    • getJumpDescentSteepness

      public double getJumpDescentSteepness(@Nonnull BuilderSupport support)
    • getJumpBlending

      public double getJumpBlending(@Nonnull BuilderSupport support)
    • getJumpDescentBlending

      public double getJumpDescentBlending(@Nonnull BuilderSupport support)
    • getDescentAnimationType

      public MotionControllerWalk.DescentAnimationType getDescentAnimationType(BuilderSupport support)
    • getAscentAnimationType

      public MotionControllerWalk.AscentAnimationType getAscentAnimationType(BuilderSupport support)
    • getDescentSteepness

      public double getDescentSteepness(@Nonnull BuilderSupport support)
    • getDescentBlending

      public double getDescentBlending(@Nonnull BuilderSupport support)
    • getMinDescentAnimationHeight

      public double getMinDescentAnimationHeight(@Nonnull BuilderSupport support)
    • getJumpRange

      public double[] getJumpRange(@Nonnull BuilderSupport support)
    • canSpawn

      @Nonnull public SpawnTestResult canSpawn(@Nonnull SpawningContext context)
      Description copied from interface: ISpawnable
      Called to test whether this spawnable class type is spawnable regarding the given context
      Parameters:
      context - The SpawningContext to test against
      Returns:
      true if this spawnable can spawn, false if otherwise
    • requiresSpawnDropHeightCheck

      public boolean requiresSpawnDropHeightCheck(@Nonnull SpawningContext context)
      Description copied from interface: ISpawnable
      Called 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 - The SpawningContext to test against
      Returns:
      true if the caller must check the spawn drop height, false if otherwise
    • getSpawnPlacement

      @Nonnull public SpawnPositionPlacement getSpawnPlacement(@Nonnull SpawningContext context)
      Description copied from interface: ISpawnable
      Query 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 - The SpawningContext to 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: ISpawnable
      Query all movement mode sets for this spawnable.
      Parameters:
      context - The SpawningContext to test against
      outSupportedMovementModes - 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

      @Nonnull public Class<? extends MotionController> getClassType()
      Specified by:
      getClassType in class BuilderMotionControllerBase
    • getSupportedMovementModes

      @Nonnull public Set<MovementMode> getSupportedMovementModes()
      Description copied from class: BuilderMotionControllerBase
      Return the set of MovementModes this motion controller supports.

      Implementations must return the static constant defined on their corresponding MotionController subclass (e.g. MotionControllerWalk.SUPPORTED_MOVEMENT_MODES). The returned set is immutable and context-independent.

      Specified by:
      getSupportedMovementModes in class BuilderMotionControllerBase