Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getComponentType()
- get(Ref, ComponentAccessor)
- getDebugDisplay()
- isTraceSuccess()
- isTraceFail()
- isTraceSensorFails()
- setLastFailingSensor(Sensor)
- getLastFailingSensor()
- isDebugRoleSteering()
- isDebugMotionSteering()
- setDisplayCustomString(String)
- pollDisplayCustomString()
- setDisplayPathfinderString(String)
- pollDisplayPathfinderString()
- getDebugFlags()
- setDebugFlags(EnumSet)
- isDebugFlagSet(RoleDebugFlags)
- isAnyDebugFlagSet(EnumSet)
- registerDebugFlagsListener(DebugSupport.DebugFlagsChangeListener)
- removeDebugFlagsListener(DebugSupport.DebugFlagsChangeListener)
- notifyDebugFlagsListeners(EnumSet)
- isVisSensorRanges()
- beginSensorVisualization()
- recordSensorRange(double, double, double)
- recordEntityCheck(Ref, int, boolean)
- getSensorVisData()
- getEntityVisData()
- hasSensorVisData()
- clearSensorVisData()
- isVisPath()
- clearPathVisualization()
- recordPathWaypoint(Vector3d, boolean, boolean)
- recordPathWaypoint(Vector3d, boolean, boolean, boolean)
- getPathVisData()
- hasPathVisData()
- clone()
Class DebugSupport
java.lang.Object
com.hypixel.hytale.server.npc.role.support.DebugSupport
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Created on 07/03/2019
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final recordData for visualizing an entity that was checked by a sensor.static final recordData for visualizing a path waypoint.static final recordData for visualizing a single sensor's detection range. -
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidResets sensor visualization data at the start of each tick.voidClears all path visualization data.voidClears the sensor visualization data after rendering.clone()static DebugSupportget(Ref<EntityStore> ref, ComponentAccessor<EntityStore> accessor) static ComponentType<EntityStore, DebugSupport> Returns the map of entity visualization data, or null if none.Returns the list of path visualization data, or null if none.Returns the list of sensor visualization data, or null if none.booleanReturns whether there is any path visualization data to render.booleanReturns whether there is any sensor visualization data to render.booleanisAnyDebugFlagSet(EnumSet<RoleDebugFlags> flags) booleanisDebugFlagSet(RoleDebugFlags flag) booleanbooleanbooleanbooleanbooleanbooleanReturns whether path visualization is enabled.booleanReturns whether sensor range visualization is enabled.voidvoidrecordEntityCheck(Ref<EntityStore> entityRef, int sensorColorIndex, boolean matched) Records an entity that was checked by a sensor.voidrecordPathWaypoint(org.joml.Vector3d position, boolean isCurrentTarget, boolean isEndNode) Records a path waypoint for visualization.voidrecordPathWaypoint(org.joml.Vector3d position, boolean isCurrentTarget, boolean isEndNode, boolean isSeekTarget) Records a path waypoint for visualization.intrecordSensorRange(double range, double minRange, double viewAngle) Records a sensor's detection range for visualization with optional view cone.voidvoidvoidsetDebugFlags(EnumSet<RoleDebugFlags> debugFlags) voidsetDisplayCustomString(String displayCustomString) voidsetDisplayPathfinderString(String displayPathfinderString) voidsetLastFailingSensor(Sensor sensor) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
DebugSupport
-
DebugSupport
public DebugSupport()
-
-
Method Details
-
getComponentType
-
get
@Nonnull public static DebugSupport get(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> accessor) -
getDebugDisplay
-
isTraceSuccess
public boolean isTraceSuccess() -
isTraceFail
public boolean isTraceFail() -
isTraceSensorFails
public boolean isTraceSensorFails() -
setLastFailingSensor
-
getLastFailingSensor
-
isDebugRoleSteering
public boolean isDebugRoleSteering() -
isDebugMotionSteering
public boolean isDebugMotionSteering() -
setDisplayCustomString
-
pollDisplayCustomString
-
setDisplayPathfinderString
-
pollDisplayPathfinderString
-
getDebugFlags
-
setDebugFlags
-
isDebugFlagSet
-
isAnyDebugFlagSet
-
registerDebugFlagsListener
-
removeDebugFlagsListener
-
notifyDebugFlagsListeners
-
isVisSensorRanges
public boolean isVisSensorRanges()Returns whether sensor range visualization is enabled. -
beginSensorVisualization
public void beginSensorVisualization()Resets sensor visualization data at the start of each tick. Clears list contents but keeps map entries to reuse ArrayList instances. -
recordSensorRange
public int recordSensorRange(double range, double minRange, double viewAngle) Records a sensor's detection range for visualization with optional view cone.- Parameters:
range- The outer detection range.minRange- The inner detection range (minimum distance).viewAngle- The view cone angle in radians (0 for full circle).- Returns:
- The color index assigned to this sensor.
-
recordEntityCheck
public void recordEntityCheck(@Nonnull Ref<EntityStore> entityRef, int sensorColorIndex, boolean matched) Records an entity that was checked by a sensor.- Parameters:
entityRef- The entity reference.sensorColorIndex- The color index of the sensor that checked it.matched- Whether the entity matched the sensor's criteria.
-
getSensorVisData
Returns the list of sensor visualization data, or null if none. -
getEntityVisData
Returns the map of entity visualization data, or null if none. -
hasSensorVisData
public boolean hasSensorVisData()Returns whether there is any sensor visualization data to render. -
clearSensorVisData
public void clearSensorVisData()Clears the sensor visualization data after rendering. -
isVisPath
public boolean isVisPath()Returns whether path visualization is enabled. -
clearPathVisualization
public void clearPathVisualization()Clears all path visualization data. -
recordPathWaypoint
public void recordPathWaypoint(@Nonnull org.joml.Vector3d position, boolean isCurrentTarget, boolean isEndNode) Records a path waypoint for visualization.- Parameters:
position- The world position of the waypoint.isCurrentTarget- Whether this is the current target waypoint.isEndNode- Whether this is the final destination node.
-
recordPathWaypoint
public void recordPathWaypoint(@Nonnull org.joml.Vector3d position, boolean isCurrentTarget, boolean isEndNode, boolean isSeekTarget) Records a path waypoint for visualization.- Parameters:
position- The world position of the waypoint.isCurrentTarget- Whether this is the current target waypoint.isEndNode- Whether this is the final destination node.isSeekTarget- Whether this is a seek/steering target (not pathfinding).
-
getPathVisData
Returns the list of path visualization data, or null if none. -
hasPathVisData
public boolean hasPathVisData()Returns whether there is any path visualization data to render. -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-