Contents
Class RailStepConfig
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.RailStepConfig
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 Summary
FieldsModifier and TypeFieldDescriptionList of nearby entities to consider for character collision during this step.Predicate that decides whether a block that would otherwise cause a collision should be treated as pass-through instead.booleanControls trigger/damage processing for blocks rejected byignoredBlockFilter.booleanWhentrue, the first entity hit clamps the rail step and setsRailStepResult.obstructed(but does not flip the MotionController's own isObstructed flag). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ignoredBlockFilter
Predicate that decides whether a block that would otherwise cause a collision should be treated as pass-through instead. Matches the contract ofCollisionResult.setBlockCollisionFilter(Predicate). When non-null, pass-through recording is enabled for the step so filter-rejected blocks are reported onRailStepResult.passThroughBlocks. -
ignoredBlocksFireTriggers
public boolean ignoredBlocksFireTriggersControls trigger/damage processing for blocks rejected byignoredBlockFilter. Non-pass-through collisions always use the normal trigger pipeline.When
true, pass-through blocks are also allowed through trigger/damage processing. Whenfalse, pass-through blocks are excluded from trigger/damage processing and are only reported onRailStepResult.passThroughBlocks. -
stopOnEntityHit
public boolean stopOnEntityHitWhentrue, the first entity hit clamps the rail step and setsRailStepResult.obstructed(but does not flip the MotionController's own isObstructed flag). Whenfalse, entity hits are reported but do not stop motion. -
candidateEntities
List of nearby entities to consider for character collision during this step. Whennull, character collision detection is disabled for the step andRailStepResult.entityHitswill remain empty. The BodyMotion owns this list and is responsible for refreshing it each tick.
-
-
Constructor Details
-
RailStepConfig
public RailStepConfig()
-