Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- setSaveSegments(boolean)
- getRelaxedConstraints()
- setRelaxedConstraints(EnumSet)
- getBlockCollisionFilter()
- setBlockCollisionFilter(Predicate)
- getBreathableBlockSet()
- setBreathableBlockSet(int)
- setPosition(Vector3dc)
- setDirection(Vector3dc)
- setTargetPosition(Vector3dc)
- canAdvance(Ref, MotionController, double, ComponentAccessor)
- canAdvanceAbs(Ref, MotionController, double, ComponentAccessor)
- canMoveTo(Ref, MotionController, double, double, ComponentAccessor)
- canMoveTo(Ref, MotionController, double, ComponentAccessor)
- computePosition(double, Vector3d)
- locateSegmentAtDistance(double, ProbeMoveData.SegmentLocation)
- startProbing()
- addStartSegment(Vector3dc, boolean)
- addEndSegment(Vector3dc, boolean, double)
- addBlockedGroundSegment(Vector3dc, double, Vector3dc, int)
- addHitGroundSegment(Vector3dc, double, Vector3dc, int)
- addHitWallSegment(Vector3dc, boolean, double, Vector3dc, int)
- addMoveSegment(Vector3dc, boolean, double)
- addClimbSegment(Vector3dc, double, int)
- addHitEdgeSegment(Vector3dc, double)
- addDropSegment(Vector3d, double)
- addBlockedDropSegment(Vector3d, double)
- changeSegmentToBlockedWall()
- changeSegmentToBlockedEdge()
- truncateBeforeInvalidPosition(MotionController, Vector3dc)
- getLastDistance()
- dump()
Class ProbeMoveData
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.ProbeMoveData
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanfinal org.joml.Vector3dbooleanfinal org.joml.Vector3dbooleanfinal org.joml.Vector3dfinal org.joml.Vector3dintfinal org.joml.Vector3d -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockedDropSegment(org.joml.Vector3d position, double distance) voidaddBlockedGroundSegment(org.joml.Vector3dc position, double distance, org.joml.Vector3dc normal, int blockId) voidaddClimbSegment(org.joml.Vector3dc position, double distance, int blockId) voidaddDropSegment(org.joml.Vector3d position, double distance) voidaddEndSegment(org.joml.Vector3dc position, boolean onGround, double distance) voidaddHitEdgeSegment(org.joml.Vector3dc position, double distance) voidaddHitGroundSegment(org.joml.Vector3dc position, double distance, org.joml.Vector3dc normal, int blockId) voidaddHitWallSegment(org.joml.Vector3dc position, boolean onGround, double distance, org.joml.Vector3dc normal, int blockId) voidaddMoveSegment(org.joml.Vector3dc position, boolean onGround, double distance) voidaddStartSegment(org.joml.Vector3dc position, boolean onGround) booleancanAdvance(Ref<EntityStore> ref, MotionController motionController, double threshold, ComponentAccessor<EntityStore> componentAccessor) booleancanAdvanceAbs(Ref<EntityStore> ref, MotionController motionController, double requiredDistance, ComponentAccessor<EntityStore> componentAccessor) booleancanMoveTo(Ref<EntityStore> ref, MotionController motionController, double maxDistance, double maxDistanceY, ComponentAccessor<EntityStore> componentAccessor) booleancanMoveTo(Ref<EntityStore> ref, MotionController motionController, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) voidvoidbooleancomputePosition(double distance, org.joml.Vector3d result) dump()intdoublebooleanlocateSegmentAtDistance(double distance, ProbeMoveData.SegmentLocation result) voidvoidsetBreathableBlockSet(int blockSet) setDirection(org.joml.Vector3dc direction) setPosition(org.joml.Vector3dc position) voidsetRelaxedConstraints(EnumSet<RelaxedConstraint> constraints) voidsetSaveSegments(boolean saveSegments) setTargetPosition(org.joml.Vector3dc targetPosition) booleandoubletruncateBeforeInvalidPosition(MotionController motionController, org.joml.Vector3dc rollbackPosition) Ends the run atrollbackPosition, the start of a step that reached a position the NPC may not stand on, and returns the shortened distance.
-
Field Details
-
probePosition
@Nonnull public final org.joml.Vector3d probePosition -
probeDirection
@Nonnull public final org.joml.Vector3d probeDirection -
initialPosition
@Nonnull public final org.joml.Vector3d initialPosition -
targetPosition
@Nonnull public final org.joml.Vector3d targetPosition -
directionComponentSelector
@Nonnull public final org.joml.Vector3d directionComponentSelector -
edgeBlocked
public boolean edgeBlocked -
isSavingSegments
public boolean isSavingSegments -
segmentCount
public int segmentCount -
segments
-
debugCollision
public boolean debugCollision
-
-
Constructor Details
-
ProbeMoveData
public ProbeMoveData()
-
-
Method Details
-
setSaveSegments
public void setSaveSegments(boolean saveSegments) -
getRelaxedConstraints
-
setRelaxedConstraints
-
getBlockCollisionFilter
-
setBlockCollisionFilter
-
getBreathableBlockSet
public int getBreathableBlockSet() -
setBreathableBlockSet
public void setBreathableBlockSet(int blockSet) -
setPosition
-
setDirection
-
setTargetPosition
-
canAdvance
public boolean canAdvance(@Nonnull Ref<EntityStore> ref, @Nonnull MotionController motionController, double threshold, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canAdvanceAbs
public boolean canAdvanceAbs(@Nonnull Ref<EntityStore> ref, @Nonnull MotionController motionController, double requiredDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canMoveTo
public boolean canMoveTo(@Nonnull Ref<EntityStore> ref, @Nonnull MotionController motionController, double maxDistance, double maxDistanceY, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
canMoveTo
public boolean canMoveTo(@Nonnull Ref<EntityStore> ref, @Nonnull MotionController motionController, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
computePosition
public boolean computePosition(double distance, @Nonnull org.joml.Vector3d result) -
locateSegmentAtDistance
public boolean locateSegmentAtDistance(double distance, @Nonnull ProbeMoveData.SegmentLocation result) -
startProbing
public boolean startProbing() -
addStartSegment
public void addStartSegment(@Nonnull org.joml.Vector3dc position, boolean onGround) -
addEndSegment
public void addEndSegment(@Nonnull org.joml.Vector3dc position, boolean onGround, double distance) -
addBlockedGroundSegment
public void addBlockedGroundSegment(@Nonnull org.joml.Vector3dc position, double distance, @Nonnull org.joml.Vector3dc normal, int blockId) -
addHitGroundSegment
public void addHitGroundSegment(@Nonnull org.joml.Vector3dc position, double distance, @Nonnull org.joml.Vector3dc normal, int blockId) -
addHitWallSegment
public void addHitWallSegment(@Nonnull org.joml.Vector3dc position, boolean onGround, double distance, @Nonnull org.joml.Vector3dc normal, int blockId) -
addMoveSegment
public void addMoveSegment(@Nonnull org.joml.Vector3dc position, boolean onGround, double distance) -
addClimbSegment
public void addClimbSegment(@Nonnull org.joml.Vector3dc position, double distance, int blockId) -
addHitEdgeSegment
public void addHitEdgeSegment(@Nonnull org.joml.Vector3dc position, double distance) -
addDropSegment
public void addDropSegment(@Nonnull org.joml.Vector3d position, double distance) -
addBlockedDropSegment
public void addBlockedDropSegment(@Nonnull org.joml.Vector3d position, double distance) -
changeSegmentToBlockedWall
public void changeSegmentToBlockedWall() -
changeSegmentToBlockedEdge
public void changeSegmentToBlockedEdge() -
truncateBeforeInvalidPosition
public double truncateBeforeInvalidPosition(@Nonnull MotionController motionController, @Nonnull org.joml.Vector3dc rollbackPosition) Ends the run atrollbackPosition, the start of a step that reached a position the NPC may not stand on, and returns the shortened distance.The stop reports blocked ground, even where a wall collision caused it.
ProbeMoveData.Segment.Type.BLOCKED_WALLmakesRailPathSmootherextend the rail past the last segment, which suits a wall the NPC may stand against. Ahead of this stop is a position it may not occupy, so the rail has to end where the probe stopped. -
getLastDistance
public double getLastDistance() -
dump
-