Class TargetUtil
java.lang.Object
com.hypixel.hytale.server.core.util.TargetUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<Ref<EntityStore>> getAllEntitiesInBox(Vector3d min, Vector3d max, ComponentAccessor<EntityStore> componentAccessor) static List<Ref<EntityStore>> getAllEntitiesInCylinder(Vector3d position, double radius, double height, ComponentAccessor<EntityStore> componentAccessor) static List<Ref<EntityStore>> getAllEntitiesInSphere(Vector3d position, double radius, ComponentAccessor<EntityStore> componentAccessor) static TransformgetLook(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) static Vector3igetTargetBlock(Ref<EntityStore> ref, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) static Vector3igetTargetBlock(Ref<EntityStore> ref, IntPredicate blockIdPredicate, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) static Vector3igetTargetBlock(World world, BiIntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance) static Vector3igetTargetBlockAvoidLocations(World world, IntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance, LinkedList<it.unimi.dsi.fastutil.longs.LongOpenHashSet> blocksToIgnore) static Ref<EntityStore> getTargetEntity(Ref<EntityStore> ref, float radius, ComponentAccessor<EntityStore> componentAccessor) static Ref<EntityStore> getTargetEntity(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) static Vector3dgetTargetLocation(Ref<EntityStore> ref, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) static Vector3dgetTargetLocation(Ref<EntityStore> ref, IntPredicate blockIdPredicate, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) static Vector3dgetTargetLocation(Transform transform, IntPredicate blockIdPredicate, double maxDistance, ComponentAccessor<EntityStore> componentAccessor) static Vector3dgetTargetLocation(World world, IntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance) private static booleanisHitByRay(Ref<EntityStore> ref, Vector3d rayStart, Vector3d rayDir, ComponentAccessor<EntityStore> componentAccessor)
-
Field Details
-
ENTITY_TARGET_RADIUS
private static final float ENTITY_TARGET_RADIUS- See Also:
-
-
Constructor Details
-
TargetUtil
public TargetUtil()
-
-
Method Details
-
getTargetBlock
@Nullable public static Vector3i getTargetBlock(@Nonnull World world, @Nonnull BiIntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance) -
getTargetLocation
@Nullable public static Vector3d getTargetLocation(@Nonnull World world, @Nonnull IntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance) -
getTargetBlockAvoidLocations
@Nullable public static Vector3i getTargetBlockAvoidLocations(@Nonnull World world, @Nonnull IntPredicate blockIdPredicate, double originX, double originY, double originZ, double directionX, double directionY, double directionZ, double maxDistance, @Nonnull LinkedList<it.unimi.dsi.fastutil.longs.LongOpenHashSet> blocksToIgnore) -
getTargetBlock
@Nullable public static Vector3i getTargetBlock(@Nonnull Ref<EntityStore> ref, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetBlock
@Nullable public static Vector3i getTargetBlock(@Nonnull Ref<EntityStore> ref, @Nonnull IntPredicate blockIdPredicate, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetLocation
@Nullable public static Vector3d getTargetLocation(@Nonnull Ref<EntityStore> ref, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetLocation
@Nullable public static Vector3d getTargetLocation(@Nonnull Ref<EntityStore> ref, @Nonnull IntPredicate blockIdPredicate, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetLocation
@Nullable public static Vector3d getTargetLocation(@Nonnull Transform transform, @Nonnull IntPredicate blockIdPredicate, double maxDistance, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getAllEntitiesInSphere
@Nonnull public static List<Ref<EntityStore>> getAllEntitiesInSphere(@Nonnull Vector3d position, double radius, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getAllEntitiesInCylinder
@Nonnull public static List<Ref<EntityStore>> getAllEntitiesInCylinder(@Nonnull Vector3d position, double radius, double height, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getAllEntitiesInBox
@Nonnull public static List<Ref<EntityStore>> getAllEntitiesInBox(@Nonnull Vector3d min, @Nonnull Vector3d max, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetEntity
@Nullable public static Ref<EntityStore> getTargetEntity(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getTargetEntity
@Nullable public static Ref<EntityStore> getTargetEntity(@Nonnull Ref<EntityStore> ref, float radius, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getLook
@Nonnull public static Transform getLook(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
isHitByRay
private static boolean isHitByRay(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d rayStart, @Nonnull Vector3d rayDir, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
-