RepulsionSystems

public class RepulsionSystems

Class RepulsionSystems. Provides repulsionsystems functionality for the Hytale server.

java.lang.Object > RepulsionSystems

Field Summary

world

final World world

Field world.

repulsionConfigIndex

final int repulsionConfigIndex

Field repulsionConfigIndex.

repulsion

final RepulsionConfig repulsion

Field repulsion.

visible

final EntityTrackerSystems.Visible visible

Field visible.

update

final ComponentUpdate update

Field update.

repulsionComponent

final Repulsion repulsionComponent

Field repulsionComponent.

radius

final float radius

Field radius.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

position

final Vector2d position

Field position.

results

final List> results

Field results.

entityTransformComponent

final TransformComponent entityTransformComponent

Field entityTransformComponent.

entityPosition

final Vector2d entityPosition

Field entityPosition.

distance

final double distance

Field distance.

fraction

final double fraction

Field fraction.

push

final Vector2d push

Field push.

entityVelocityComponent

final Velocity entityVelocityComponent

Field entityVelocityComponent.

addedVelocity

final Vector3d addedVelocity

Field addedVelocity.

Method Detail

PlayerSetup

public public PlayerSetup (final ComponentType componentType, final ComponentType playerComponentType)

Method PlayerSetup.

Parameters:
final ComponentType componentType
final ComponentType playerComponentType

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdd

public void onEntityAdd (@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)

Method onEntityAdd.

Parameters:
@Nonnull final Holder holder
@Nonnull final AddReason reason
@Nonnull final Store store

Repulsion

public new Repulsion (repulsion)

Method Repulsion.

Parameters:
repulsion repulsion

onEntityRemoved

public void onEntityRemoved (@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)

Method onEntityRemoved.

Parameters:
@Nonnull final Holder holder
@Nonnull final RemoveReason reason
@Nonnull final Store store

EntityTrackerUpdate

public public EntityTrackerUpdate (final ComponentType visibleComponentType, final ComponentType componentType)

Method EntityTrackerUpdate.

Parameters:
final ComponentType visibleComponentType
final ComponentType componentType

getGroup

public SystemGroup getGroup ()

Method getGroup.

isParallel

public boolean isParallel (final int archetypeChunkSize, final int taskCount)

Method isParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

tick

public void tick (final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
final int index
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

if

public else if (!visible.newlyVisibleTo.isEmpty()

Method if.

Parameters:
!visible.newlyVisibleTo.isEmpty( !visible.newlyVisibleTo.isEmpty(

queueUpdatesFor

static void queueUpdatesFor (final Ref ref, @Nonnull final Repulsion repulsion, @Nonnull final Map, EntityTrackerSystems.EntityViewer> visibleTo)

Method queueUpdatesFor.

Parameters:
final Ref ref
@Nonnull final Repulsion repulsion
@Nonnull final Map, EntityTrackerSystems.EntityViewer> visibleTo

EntityTrackerRemove

public public EntityTrackerRemove (final ComponentType visibleComponentType, final ComponentType componentType)

Method EntityTrackerRemove.

Parameters:
final ComponentType visibleComponentType
final ComponentType componentType

componentType

public Repulsion> componentType ()

Method componentType.

onComponentAdded

public void onComponentAdded (@Nonnull final Ref ref, @Nonnull final Repulsion component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentAdded.

Parameters:
@Nonnull final Ref ref
@Nonnull final Repulsion component
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onComponentSet

public void onComponentSet (@Nonnull final Ref ref, final Repulsion oldComponent, @Nonnull final Repulsion newComponent, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentSet.

Parameters:
@Nonnull final Ref ref
final Repulsion oldComponent
@Nonnull final Repulsion newComponent
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onComponentRemoved

public void onComponentRemoved (@Nonnull final Ref ref, @Nonnull final Repulsion component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onComponentRemoved.

Parameters:
@Nonnull final Ref ref
@Nonnull final Repulsion component
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

RepulsionTicker

public public RepulsionTicker (final ComponentType repulsionComponentType, final ComponentType transformComponentComponentType, final ResourceType, EntityStore>> spatialComponent)

Method RepulsionTicker.

Parameters:
final ComponentType repulsionComponentType
final ComponentType transformComponentComponentType
final ResourceType, EntityStore>> spatialComponent

SystemDependency

public new SystemDependency (Order.AFTER, PlayerSpatialSystem.class, OrderPriority.CLOSEST)

Method SystemDependency.

Parameters:
Order.AFTER Order.AFTER
PlayerSpatialSystem.class PlayerSpatialSystem.class
OrderPriority.CLOSEST OrderPriority.CLOSEST

getDependencies

public Set> getDependencies ()

Method getDependencies.

Vector2d

public new Vector2d (transformComponent.getPosition()

Method Vector2d.

Parameters:
transformComponent.getPosition( transformComponent.getPosition(

Vector3d

public new Vector3d ((float)

Method Vector3d.

Parameters:
(float (float