Class SteeringForceAvoidCollision
java.lang.Object
com.hypixel.hytale.server.npc.movement.steeringforces.SteeringForceWithGroup
com.hypixel.hytale.server.npc.movement.steeringforces.SteeringForceAvoidCollision
- All Implemented Interfaces:
SteeringForce
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Role.AvoidanceModeprivate booleanprivate final Vector3dprivate doubleprivate booleanprivate doubleprotected final Vector3dprivate doubleprivate doubleprivate Ref<EntityStore> private booleanprivate doubleprivate Ref<EntityStore> private final Vector3dprivate doubleprivate final Vector3dprivate final double[]private final Vector3dprivate doubleFields inherited from class com.hypixel.hytale.server.npc.movement.steeringforces.SteeringForceWithGroup
componentSelector, selfPosition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Ref<EntityStore> ref, CommandBuffer<EntityStore> commandBuffer) booleandoubledoublevoidreset()voidsetAvoidanceMode(Role.AvoidanceMode avoidanceMode) voidsetDebug(boolean debug) voidsetFalloff(double falloff) voidsetMaxDistance(double distance) voidsetRadiusFromEntity(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) voidsetSelf(Ref<EntityStore> ref, Vector3d position, ComponentAccessor<EntityStore> componentAccessor) voidsetSelf(Ref<EntityStore> ref, Vector3d position, Vector3d velocity, double radius, ComponentAccessor<EntityStore> componentAccessor) voidsetSelfRadius(double selfRadius) voidsetSelfVelocity(Vector3d selfVelocity) voidsetStrength(double strength) voidsetVelocityFromEntity(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.server.npc.movement.steeringforces.SteeringForceWithGroup
setComponentSelector
-
Field Details
-
selfVelocity
-
selfRadius
private double selfRadius -
collisionTime
private double collisionTime -
colliderPosition
-
tempTime
private final double[] tempTime -
tempPos
-
tempVel
-
maxDistance
private double maxDistance -
falloff
private double falloff -
strength
private double strength -
avoidanceMode
-
selfReference
-
otherReference
-
velocity
private double velocity -
maxTime
private double maxTime -
canSlowDown
private boolean canSlowDown -
overlap
private boolean overlap -
lastSteeringDirection
-
debug
private boolean debug
-
-
Constructor Details
-
SteeringForceAvoidCollision
public SteeringForceAvoidCollision()
-
-
Method Details
-
setDebug
public void setDebug(boolean debug) -
getAvoidanceMode
-
setAvoidanceMode
-
setSelf
public void setSelf(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Overrides:
setSelfin classSteeringForceWithGroup
-
setSelf
public void setSelf(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d position, @Nullable Vector3d velocity, double radius, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
reset
public void reset()- Specified by:
resetin classSteeringForceWithGroup
-
compute
- Specified by:
computein interfaceSteeringForce- Overrides:
computein classSteeringForceWithGroup
-
add
- Specified by:
addin classSteeringForceWithGroup
-
setVelocityFromEntity
public void setVelocityFromEntity(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setRadiusFromEntity
public void setRadiusFromEntity(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
setMaxDistance
public void setMaxDistance(double distance) -
setFalloff
public void setFalloff(double falloff) -
setSelfVelocity
-
getSelfVelocity
-
getSelfRadius
public double getSelfRadius() -
setSelfRadius
public void setSelfRadius(double selfRadius) -
getStrength
public double getStrength() -
setStrength
public void setStrength(double strength) -
getLastSteeringDirection
-