public class RepulsionSystems
Class RepulsionSystems. Provides repulsionsystems functionality for the Hytale server.
java.lang.Object > RepulsionSystems
Field Summary
world
Field world.
repulsionConfigIndex
Field repulsionConfigIndex.
repulsion
Field repulsion.
visible
Field visible.
update
Field update.
repulsionComponent
Field repulsionComponent.
radius
Field radius.
transformComponent
Field transformComponent.
position
Field position.
entityTransformComponent
Field entityTransformComponent.
entityPosition
Field entityPosition.
distance
Field distance.
fraction
Field fraction.
push
Field push.
entityVelocityComponent
Field entityVelocityComponent.
addedVelocity
Field addedVelocity.
Method Detail
PlayerSetup
public
PlayerSetup
(final ComponentType componentType, final ComponentType playerComponentType)
Method PlayerSetup.
- Parameters:
final ComponentTypecomponentTypefinal ComponentTypeplayerComponentType
onEntityAdd
void
onEntityAdd
(@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)
Method onEntityAdd.
- Parameters:
@Nonnull final Holderholder@Nonnull final AddReasonreason@Nonnull final Storestore
Repulsion
new
Repulsion
(repulsion)
Method Repulsion.
- Parameters:
repulsionrepulsion
onEntityRemoved
void
onEntityRemoved
(@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)
Method onEntityRemoved.
- Parameters:
@Nonnull final Holderholder@Nonnull final RemoveReasonreason@Nonnull final Storestore
EntityTrackerUpdate
public
EntityTrackerUpdate
(final ComponentType visibleComponentType, final ComponentType componentType)
Method EntityTrackerUpdate.
- Parameters:
final ComponentTypevisibleComponentTypefinal ComponentTypecomponentType
isParallel
boolean
isParallel
(final int archetypeChunkSize, final int taskCount)
Method isParallel.
- Parameters:
final intarchetypeChunkSizefinal inttaskCount
tick
void
tick
(final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method tick.
- Parameters:
final floatdtfinal intindex@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
if
else
if
(!visible.newlyVisibleTo.isEmpty()
Method if.
- Parameters:
!visible.newlyVisibleTo.isEmpty(!visible.newlyVisibleTo.isEmpty(
queueUpdatesFor
void
queueUpdatesFor
(final Ref ref, @Nonnull final Repulsion repulsion, @Nonnull final Map, EntityTrackerSystems.EntityViewer> visibleTo)
Method queueUpdatesFor.
- Parameters:
final Refref@Nonnull final Repulsionrepulsion@Nonnull final Map, EntityTrackerSystems.EntityViewer>visibleTo
EntityTrackerRemove
public
EntityTrackerRemove
(final ComponentType visibleComponentType, final ComponentType componentType)
Method EntityTrackerRemove.
- Parameters:
final ComponentTypevisibleComponentTypefinal ComponentTypecomponentType
componentType
Repulsion>
componentType
()
Method componentType.
onComponentAdded
void
onComponentAdded
(@Nonnull final Ref ref, @Nonnull final Repulsion component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onComponentAdded.
- Parameters:
@Nonnull final Refref@Nonnull final Repulsioncomponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onComponentSet
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 Refreffinal RepulsionoldComponent@Nonnull final RepulsionnewComponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onComponentRemoved
void
onComponentRemoved
(@Nonnull final Ref ref, @Nonnull final Repulsion component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onComponentRemoved.
- Parameters:
@Nonnull final Refref@Nonnull final Repulsioncomponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
RepulsionTicker
public
RepulsionTicker
(final ComponentType repulsionComponentType, final ComponentType transformComponentComponentType, final ResourceType, EntityStore>> spatialComponent)
Method RepulsionTicker.
- Parameters:
final ComponentTyperepulsionComponentTypefinal ComponentTypetransformComponentComponentTypefinal ResourceTypespatialComponent, EntityStore>>
SystemDependency
new
SystemDependency
(Order.AFTER, PlayerSpatialSystem.class, OrderPriority.CLOSEST)
Method SystemDependency.
- Parameters:
Order.AFTEROrder.AFTERPlayerSpatialSystem.classPlayerSpatialSystem.classOrderPriority.CLOSESTOrderPriority.CLOSEST
getDependencies
Set>
getDependencies
()
Method getDependencies.
Vector2d
new
Vector2d
(transformComponent.getPosition()
Method Vector2d.
- Parameters:
transformComponent.getPosition(transformComponent.getPosition(
Vector3d
new
Vector3d
((float)
Method Vector3d.
- Parameters:
(float(float