Class RailStepConfig

java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.RailStepConfig

public final class RailStepConfig extends Object
Per-tick configuration for MotionController.applyRailStep(Ref, Role, Vector3dc, RailStepConfig, RailStepResult, ComponentAccessor).

Instances are meant to be allocated once by the BodyMotion and mutated in place each tick to avoid allocations. All fields are optional; the defaults disable filtering, entity detection, and trigger interactions from filter-rejected blocks.

  • Field Details

    • ignoredBlockFilter

      @Nullable public Predicate<CollisionConfig> ignoredBlockFilter
      Predicate that decides whether a block that would otherwise cause a collision should be treated as pass-through instead. Matches the contract of CollisionResult.setBlockCollisionFilter(Predicate). When non-null, pass-through recording is enabled for the step so filter-rejected blocks are reported on RailStepResult.passThroughBlocks.
    • ignoredBlocksFireTriggers

      public boolean ignoredBlocksFireTriggers
      Controls trigger/damage processing for blocks rejected by ignoredBlockFilter. Non-pass-through collisions always use the normal trigger pipeline.

      When true, pass-through blocks are also allowed through trigger/damage processing. When false, pass-through blocks are excluded from trigger/damage processing and are only reported on RailStepResult.passThroughBlocks.

    • stopOnEntityHit

      public boolean stopOnEntityHit
      When true, the first entity hit clamps the rail step and sets RailStepResult.obstructed (but does not flip the MotionController's own isObstructed flag). When false, entity hits are reported but do not stop motion.
    • candidateEntities

      @Nullable public List<Ref<EntityStore>> candidateEntities
      List of nearby entities to consider for character collision during this step. When null, character collision detection is disabled for the step and RailStepResult.entityHits will remain empty. The BodyMotion owns this list and is responsible for refreshing it each tick.
  • Constructor Details

    • RailStepConfig

      public RailStepConfig()