Class EntityList
java.lang.Object
com.hypixel.hytale.common.collection.BucketList<Ref<EntityStore>>
com.hypixel.hytale.server.npc.role.support.EntityList
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hypixel.hytale.common.collection.BucketList
BucketList.Bucket<E>, BucketList.SortBufferProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected it.unimi.dsi.fastutil.ints.IntArrayListprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected static final ComponentType<EntityStore, TransformComponent> protected final BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> Fields inherited from class com.hypixel.hytale.common.collection.BucketList
bucketCount, bucketIndices, bucketItemPool, buckets, CLOSER_TO_SELF, EMPTY_INDICES, INITIAL_BUCKET_ITEM_ARRAY_SIZE, squaredMaxDistance -
Constructor Summary
ConstructorsConstructorDescriptionEntityList(BucketItemPool<Ref<EntityStore>> holderPool, BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> validator) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Ref<EntityStore> ref, Vector3d parentPosition, CommandBuffer<EntityStore> commandBuffer) <S,T> int countEntitiesInRange(double minRange, double maxRange, int maxCount, QuadPredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> filter, S s, T t, ComponentAccessor<EntityStore> componentAccessor) void<T,U, V> void forEachEntity(DoubleQuadObjectConsumer<Ref<EntityStore>, T, U, V> consumer, T t, U u, V v, double d, ComponentAccessor<EntityStore> componentAccessor) <T,U> void forEachEntityAvoidance(Set<Ref<EntityStore>> ignoredEntitiesForAvoidance, QuadConsumer<Ref<EntityStore>, T, U, CommandBuffer<EntityStore>> consumer, T t, U u, CommandBuffer<EntityStore> commandBuffer) <T> voidforEachEntityAvoidance(Set<Ref<EntityStore>> ignoredEntitiesForAvoidance, TriConsumer<Ref<EntityStore>, T, CommandBuffer<EntityStore>> consumer, T t, CommandBuffer<EntityStore> commandBuffer) <T,U, V, R>
voidforEachEntityUnordered(double maxDistance, QuadPredicate<Ref<EntityStore>, T, U, ComponentAccessor<EntityStore>> predicate, QuadConsumer<Ref<EntityStore>, T, V, R> consumer, T t, U u, V v, R r, ComponentAccessor<EntityStore> componentAccessor) it.unimi.dsi.fastutil.ints.IntArrayListgetClosestEntityInRange(double minRange, double maxRange, Predicate<Ref<EntityStore>> filter, ComponentAccessor<EntityStore> componentAccessor) <S,T> Ref <EntityStore> getClosestEntityInRange(Ref<EntityStore> ignoredEntityReference, double minRange, double maxRange, QuadPredicate<S, Ref<EntityStore>, Role, T> filter, Role role, S s, T t, ComponentAccessor<EntityStore> componentAccessor) <S,T> Ref <EntityStore> getClosestEntityInRangeProjected(Ref<EntityStore> parentRef, Ref<EntityStore> ignoredEntityReference, com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, double minRange, double maxRange, QuadPredicate<S, Ref<EntityStore>, Role, T> filter, Role role, S s, T t, ComponentAccessor<EntityStore> componentAccessor) intintintintintrequireDistanceAvoidance(int value) intrequireDistanceSorted(int value) intrequireDistanceUnsorted(int value) voidreset()<S,T> boolean testAnyEntity(double maxDistance, QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, ComponentAccessor<EntityStore> componentAccessor) <S,T> boolean testAnyEntityDistanceSquared(double maxDistanceSquared, QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, double d, ComponentAccessor<EntityStore> componentAccessor) <S,T> boolean testAnyEntityDistanceSquared(double maxDistanceSquared, QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, ComponentAccessor<EntityStore> componentAccessor) protected Ref<EntityStore> validateEntityRef(BucketItem<Ref<EntityStore>> holder, ComponentAccessor<EntityStore> componentAccessor) Methods inherited from class com.hypixel.hytale.common.collection.BucketList
add, addBucketDistance, addBucketDistance, area, clear, configure, configure, configureWithPresortedArray, configureWithPreSortedArray, configureWithPreSortedArray, getBucket, getBucketCount, getClosestInRange, getFirstBucketIndex, getLastBucketIndex, setBucketItemPool
-
Field Details
-
BUCKET_COUNT
protected static final int BUCKET_COUNT- See Also:
-
BUCKET_DISTANCE_NEAR
protected static final int BUCKET_DISTANCE_NEAR- See Also:
-
BUCKET_DISTANCE_NEARER
protected static final int BUCKET_DISTANCE_NEARER- See Also:
-
TRANSFORM_COMPONENT_TYPE
-
validator
-
bucketRanges
protected it.unimi.dsi.fastutil.ints.IntArrayList bucketRanges -
maxDistanceUnsorted
protected int maxDistanceUnsorted -
maxDistanceSorted
protected int maxDistanceSorted -
maxDistanceAvoidance
protected int maxDistanceAvoidance -
squaredMaxDistanceSorted
protected int squaredMaxDistanceSorted -
squaredMaxDistanceAvoidance
protected int squaredMaxDistanceAvoidance -
squaredMaxDistanceUnsorted
protected int squaredMaxDistanceUnsorted -
searchRadius
protected int searchRadius
-
-
Constructor Details
-
EntityList
public EntityList(@Nullable BucketItemPool<Ref<EntityStore>> holderPool, @Nonnull BiPredicate<Ref<EntityStore>, ComponentAccessor<EntityStore>> validator)
-
-
Method Details
-
getMaxDistanceUnsorted
public int getMaxDistanceUnsorted() -
getMaxDistanceSorted
public int getMaxDistanceSorted() -
getMaxDistanceAvoidance
public int getMaxDistanceAvoidance() -
getSearchRadius
public int getSearchRadius() -
getBucketRanges
public it.unimi.dsi.fastutil.ints.IntArrayList getBucketRanges() -
reset
public void reset()- Overrides:
resetin classBucketList<Ref<EntityStore>>
-
requireDistanceSorted
public int requireDistanceSorted(int value) -
requireDistanceUnsorted
public int requireDistanceUnsorted(int value) -
requireDistanceAvoidance
public int requireDistanceAvoidance(int value) -
finalizeConfiguration
public void finalizeConfiguration() -
add
public void add(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d parentPosition, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
forEachEntity
public <T,U, void forEachEntityV> (@Nonnull DoubleQuadObjectConsumer<Ref<EntityStore>, T, U, V> consumer, T t, U u, V v, double d, ComponentAccessor<EntityStore> componentAccessor) -
forEachEntityUnordered
public <T,U, void forEachEntityUnorderedV, R> (double maxDistance, @Nonnull QuadPredicate<Ref<EntityStore>, T, U, ComponentAccessor<EntityStore>> predicate, @Nonnull QuadConsumer<Ref<EntityStore>, T, V, R> consumer, T t, U u, V v, R r, ComponentAccessor<EntityStore> componentAccessor) -
forEachEntityAvoidance
public <T> void forEachEntityAvoidance(@Nonnull Set<Ref<EntityStore>> ignoredEntitiesForAvoidance, @Nonnull TriConsumer<Ref<EntityStore>, T, CommandBuffer<EntityStore>> consumer, T t, CommandBuffer<EntityStore> commandBuffer) -
forEachEntityAvoidance
public <T,U> void forEachEntityAvoidance(@Nonnull Set<Ref<EntityStore>> ignoredEntitiesForAvoidance, @Nonnull QuadConsumer<Ref<EntityStore>, T, U, CommandBuffer<EntityStore>> consumer, T t, U u, CommandBuffer<EntityStore> commandBuffer) -
countEntitiesInRange
public <S,T> int countEntitiesInRange(double minRange, double maxRange, int maxCount, @Nonnull QuadPredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> filter, S s, T t, ComponentAccessor<EntityStore> componentAccessor) -
getClosestEntityInRange
@Nullable public Ref<EntityStore> getClosestEntityInRange(double minRange, double maxRange, @Nonnull Predicate<Ref<EntityStore>> filter, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getClosestEntityInRange
@Nullable public <S,T> Ref<EntityStore> getClosestEntityInRange(@Nullable Ref<EntityStore> ignoredEntityReference, double minRange, double maxRange, @Nonnull QuadPredicate<S, Ref<EntityStore>, Role, T> filter, Role role, S s, T t, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getClosestEntityInRangeProjected
@Nullable public <S,T> Ref<EntityStore> getClosestEntityInRangeProjected(@Nonnull Ref<EntityStore> parentRef, @Nullable Ref<EntityStore> ignoredEntityReference, @Nonnull com.hypixel.hytale.server.npc.movement.controllers.MotionController motionController, double minRange, double maxRange, @Nonnull QuadPredicate<S, Ref<EntityStore>, Role, T> filter, Role role, S s, T t, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
testAnyEntity
public <S,T> boolean testAnyEntity(double maxDistance, @Nonnull QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, ComponentAccessor<EntityStore> componentAccessor) -
testAnyEntityDistanceSquared
public <S,T> boolean testAnyEntityDistanceSquared(double maxDistanceSquared, @Nonnull QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, ComponentAccessor<EntityStore> componentAccessor) -
testAnyEntityDistanceSquared
public <S,T> boolean testAnyEntityDistanceSquared(double maxDistanceSquared, @Nonnull QuadObjectDoublePredicate<S, Ref<EntityStore>, T, ComponentAccessor<EntityStore>> predicate, S s, T t, double d, ComponentAccessor<EntityStore> componentAccessor) -
validateEntityRef
@Nullable protected Ref<EntityStore> validateEntityRef(@Nonnull BucketItem<Ref<EntityStore>> holder, ComponentAccessor<EntityStore> componentAccessor)
-