SensorEntityBase

abstract class SensorEntityBase extends SensorWithEntityFilters

Class SensorEntityBase. Provides sensorentitybase functionality for the Hytale server.

java.lang.Object > SensorWithEntityFilters > SensorEntityBase

Field Summary

npcPrioritiser

protected IEntityByPriorityFilter npcPrioritiser

Field npcPrioritiser.

playerPrioritiser

protected IEntityByPriorityFilter playerPrioritiser

Field playerPrioritiser.

ownRole

protected int ownRole

Field ownRole.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector3d position

Field position.

targetRef

final Ref targetRef

Field targetRef.

target

final Ref target

Field target.

playerComponent

final Player playerComponent

Field playerComponent.

gameMode

final GameMode gameMode

Field gameMode.

playerSettingsComponent

final PlayerSettings playerSettingsComponent

Field playerSettingsComponent.

allowDetection

final boolean allowDetection

Field allowDetection.

targetTransformComponent

final TransformComponent targetTransformComponent

Field targetTransformComponent.

pos

final Vector3d pos

Field pos.

squaredDistance

final double squaredDistance

Field squaredDistance.

npcComponent

final NPCEntity npcComponent

Field npcComponent.

match

final boolean match

Field match.

ignoredEntity

final Ref ignoredEntity

Field ignoredEntity.

Method Detail

SensorEntityBase

public public SensorEntityBase (@Nonnull final BuilderSensorEntityBase builder, final ISensorEntityPrioritiser prioritiser, @Nonnull final BuilderSupport builderSupport)

Method SensorEntityBase.

Parameters:
@Nonnull final BuilderSensorEntityBase builder
final ISensorEntityPrioritiser prioritiser
@Nonnull final BuilderSupport builderSupport

matches

public boolean matches (@Nonnull final Ref ref, @Nonnull final Role role, final double dt, @Nonnull final Store store)

Method matches.

Parameters:
@Nonnull final Ref ref
@Nonnull final Role role
final double dt
@Nonnull final Store store

done

public void done ()

Method done.

getSensorInfo

public InfoProvider getSensorInfo ()

Method getSensorInfo.

registerWithSupport

public void registerWithSupport (@Nonnull final Role role)

Method registerWithSupport.

Parameters:
@Nonnull final Role role

motionControllerChanged

public void motionControllerChanged (@Nullable final Ref ref, @Nonnull final NPCEntity npcComponent, final MotionController motionController, @Nullable final ComponentAccessor componentAccessor)

Method motionControllerChanged.

Parameters:
@Nullable final Ref ref
@Nonnull final NPCEntity npcComponent
final MotionController motionController
@Nullable final ComponentAccessor componentAccessor

loaded

public void loaded (final Role role)

Method loaded.

Parameters:
final Role role

spawned

public void spawned (final Role role)

Method spawned.

Parameters:
final Role role

unloaded

public void unloaded (final Role role)

Method unloaded.

Parameters:
final Role role

removed

public void removed (final Role role)

Method removed.

Parameters:
final Role role

teleported

public void teleported (final Role role, final World from, final World to)

Method teleported.

Parameters:
final Role role
final World from
final World to

initialisePrioritiser

protected void initialisePrioritiser ()

Method initialisePrioritiser.

isExcludingOwnType

protected boolean isExcludingOwnType ()

Method isExcludingOwnType.

filterLockedEntity

protected Ref filterLockedEntity (@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final Role role, @Nonnull final Store store)

Method filterLockedEntity.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3d position
@Nonnull final Role role
@Nonnull final Store store

filterEntityWithRange

protected boolean filterEntityWithRange (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final Vector3d position, @Nonnull final Role role, @Nonnull final Store store)

Method filterEntityWithRange.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final Vector3d position
@Nonnull final Role role
@Nonnull final Store store

filterEntity

protected boolean filterEntity (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final Role role, @Nonnull final Store store)

Method filterEntity.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final Role role
@Nonnull final Store store

filterPrioritisedPlayer

protected boolean filterPrioritisedPlayer (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final Role role, @Nonnull final Store store)

Method filterPrioritisedPlayer.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final Role role
@Nonnull final Store store

filterPrioritisedNPC

protected boolean filterPrioritisedNPC (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final Role role, @Nonnull final Store store)

Method filterPrioritisedNPC.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final Role role
@Nonnull final Store store

filterPrioritisedEntity

protected boolean filterPrioritisedEntity (@Nonnull final Ref ref, @Nonnull final Ref targetRef, @Nonnull final Role role, @Nonnull final Store store, @Nonnull final IEntityByPriorityFilter playerPrioritiser)

Method filterPrioritisedEntity.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref targetRef
@Nonnull final Role role
@Nonnull final Store store
@Nonnull final IEntityByPriorityFilter playerPrioritiser

findPlayerOrEntity

protected Ref findPlayerOrEntity (@Nonnull final Ref ref, @Nonnull final Vector3d position, @Nonnull final Role role, @Nonnull final Store store)

Method findPlayerOrEntity.

Parameters:
@Nonnull final Ref ref
@Nonnull final Vector3d position
@Nonnull final Role role
@Nonnull final Store store

if

public else if (player == null)

Method if.

Parameters:
player == null