Class EntityRefCollisionProvider
java.lang.Object
com.hypixel.hytale.server.core.modules.collision.EntityRefCollisionProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected Boxprotected final Vector3dprotected EntityContactData[]protected intprotected Vector3dprotected BiPredicate<Ref<EntityStore>, CommandBuffer<EntityStore>> protected static final doubleprotected Stringprotected Ref<EntityStore> protected Ref<EntityStore> protected final Vector2dprotected doubleprotected Vector3dprotected EntityContactData[]protected final Boxprotected List<Ref<EntityStore>> protected Vector3d -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidacceptNearestIgnore(Ref<EntityStore> entity, CommandBuffer<EntityStore> commandBuffer) voidclear()protected voiddoublecomputeNearest(CommandBuffer<EntityStore> commandBuffer, Box entityBoundingBox, Vector3d pos, Vector3d dir, Ref<EntityStore> ignoreSelf, Ref<EntityStore> ignore) doublecomputeNearest(CommandBuffer<EntityStore> commandBuffer, Vector3d pos, Vector3d dir, Box boundingBox, double radius, BiPredicate<Ref<EntityStore>, CommandBuffer<EntityStore>> entityFilter, Ref<EntityStore> ignoreSelf, Ref<EntityStore> ignoreOther) static booleandefaultEntityFilter(Ref<EntityStore> entity, CommandBuffer<EntityStore> commandBuffer) getContact(int i) intgetCount()protected booleanisColliding(Ref<EntityStore> ref, Vector2d minMax, CommandBuffer<EntityStore> commandBuffer) protected voiditerateEntitiesInSphere(CommandBuffer<EntityStore> commandBuffer, Vector3d pos, Vector3d dir, Box boundingBox, double radius, TriConsumer<EntityRefCollisionProvider, Ref<EntityStore>, CommandBuffer<EntityStore>> consumer) protected voidsetContact(Ref<EntityStore> ref, String detailName)
-
Field Details
-
ALLOC_SIZE
protected static final int ALLOC_SIZE- See Also:
-
EXTRA_DISTANCE
protected static final double EXTRA_DISTANCE- See Also:
-
contacts
-
sortBuffer
-
count
protected int count -
minMax
-
collisionPosition
-
tempBox
-
nearestCollisionStart
protected double nearestCollisionStart -
position
-
direction
-
boundingBox
-
entityFilter
-
ignoreSelf
-
ignoreOther
-
tmpResults
-
tmpVector
-
hitDetail
-
-
Constructor Details
-
EntityRefCollisionProvider
public EntityRefCollisionProvider()
-
-
Method Details
-
getCount
public int getCount() -
getContact
-
clear
public void clear() -
computeNearest
public double computeNearest(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Box entityBoundingBox, @Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nullable Ref<EntityStore> ignoreSelf, @Nullable Ref<EntityStore> ignore) -
computeNearest
public double computeNearest(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nonnull Box boundingBox, double radius, @Nonnull BiPredicate<Ref<EntityStore>, CommandBuffer<EntityStore>> entityFilter, @Nullable Ref<EntityStore> ignoreSelf, @Nullable Ref<EntityStore> ignoreOther) -
iterateEntitiesInSphere
protected void iterateEntitiesInSphere(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Vector3d pos, @Nonnull Vector3d dir, @Nonnull Box boundingBox, double radius, @Nonnull TriConsumer<EntityRefCollisionProvider, Ref<EntityStore>, CommandBuffer<EntityStore>> consumer) -
setContact
-
isColliding
protected boolean isColliding(@Nonnull Ref<EntityStore> ref, @Nonnull Vector2d minMax, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
clearRefs
protected void clearRefs() -
defaultEntityFilter
public static boolean defaultEntityFilter(@Nonnull Ref<EntityStore> entity, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
acceptNearestIgnore
protected void acceptNearestIgnore(@Nonnull Ref<EntityStore> entity, @Nonnull CommandBuffer<EntityStore> commandBuffer)
-