Uses of Class
org.bukkit.util.Vector
-
Packages that use Vector Package Description org.bukkit The root package of the Bukkit API, contains generalized API classes.org.bukkit.block Classes used to manipulate the voxels in aworld, including special states.org.bukkit.configuration Classes dedicated to handling a plugin's runtime configuration.org.bukkit.entity Interfaces for non-voxel objects that can exist in aworld, including all players, monsters, projectiles, etc.org.bukkit.event.block org.bukkit.event.entity org.bukkit.event.player org.bukkit.projectiles Classes to represent the source of a projectileorg.bukkit.util Multi and single purpose classes to facilitate various programmatic concepts. -
-
Uses of Vector in org.bukkit
Methods in org.bukkit that return Vector Modifier and Type Method Description @NotNull VectorLocation. getDirection()Gets a unit-vector pointing in the direction that this Location is facing.@NotNull VectorLocation. toVector()Constructs a newVectorbased on this LocationMethods in org.bukkit with parameters of type Vector Modifier and Type Method Description @NotNull LocationLocation. add(@NotNull Vector vec)Adds the location by a vector.@Nullable RayTraceResultWorld. rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<Entity> filter)Performs a ray trace that checks for both block and entity collisions.@Nullable RayTraceResultWorld. rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.@Nullable RayTraceResultWorld. rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.@Nullable RayTraceResultWorld. rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks)Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.@Nullable RayTraceResultWorld. rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance)Performs a ray trace that checks for entity collisions.@Nullable RayTraceResultWorld. rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize)Performs a ray trace that checks for entity collisions.@Nullable RayTraceResultWorld. rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<Entity> filter)Performs a ray trace that checks for entity collisions.@Nullable RayTraceResultWorld. rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<Entity> filter)Performs a ray trace that checks for entity collisions.@NotNull LocationLocation. setDirection(@NotNull Vector vector)@NotNull ArrowWorld. spawnArrow(@NotNull Location location, @NotNull Vector direction, float speed, float spread)<T extends AbstractArrow>
TWorld. spawnArrow(@NotNull Location location, @NotNull Vector direction, float speed, float spread, @NotNull Class<T> clazz)Creates an arrow entity of the given class at the givenLocation@NotNull LocationLocation. subtract(@NotNull Vector vec)Subtracts the location by a vector. -
Uses of Vector in org.bukkit.block
Methods in org.bukkit.block that return Vector Modifier and Type Method Description @NotNull VectorBlockFace. getDirection()Gets the normal vector corresponding to this block face.Methods in org.bukkit.block with parameters of type Vector Modifier and Type Method Description @Nullable RayTraceResultBlock. rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode)Performs a ray trace that checks for collision with this specific block in its current state using its precise collision shape. -
Uses of Vector in org.bukkit.configuration
Methods in org.bukkit.configuration that return Vector Modifier and Type Method Description @Nullable VectorConfigurationSection. getVector(@NotNull String path)Gets the requested Vector by path.@Nullable VectorConfigurationSection. getVector(@NotNull String path, @Nullable Vector def)Gets the requestedVectorby path, returning a default value if not found.@Nullable VectorMemorySection. getVector(@NotNull String path)@Nullable VectorMemorySection. getVector(@NotNull String path, @Nullable Vector def)Methods in org.bukkit.configuration with parameters of type Vector Modifier and Type Method Description @Nullable VectorConfigurationSection. getVector(@NotNull String path, @Nullable Vector def)Gets the requestedVectorby path, returning a default value if not found.@Nullable VectorMemorySection. getVector(@NotNull String path, @Nullable Vector def) -
Uses of Vector in org.bukkit.entity
Methods in org.bukkit.entity that return Vector Modifier and Type Method Description @NotNull VectorMinecart. getDerailedVelocityMod()Gets the derailed velocity modifier.@NotNull VectorFireball. getDirection()Retrieve the direction this fireball is heading toward@NotNull VectorMinecart. getFlyingVelocityMod()Gets the flying velocity modifier.@NotNull VectorEntity. getVelocity()Gets this entity's current velocity@NotNull VectorVehicle. getVelocity()Gets the vehicle's velocity.Methods in org.bukkit.entity with parameters of type Vector Modifier and Type Method Description voidMinecart. setDerailedVelocityMod(@NotNull Vector derailed)Sets the derailed velocity modifier.voidFireball. setDirection(@NotNull Vector direction)Fireballs fly straight and do not take setVelocity(...) well.voidMinecart. setFlyingVelocityMod(@NotNull Vector flying)Sets the flying velocity modifier.voidEntity. setVelocity(@NotNull Vector velocity)Sets this entity's velocityvoidVehicle. setVelocity(@NotNull Vector vel)Sets the vehicle's velocity. -
Uses of Vector in org.bukkit.event.block
Methods in org.bukkit.event.block that return Vector Modifier and Type Method Description @NotNull VectorBlockDispenseEvent. getVelocity()Gets the velocity.Methods in org.bukkit.event.block with parameters of type Vector Modifier and Type Method Description voidBlockDispenseEvent. setVelocity(@NotNull Vector vel)Sets the velocity of the item being dispensed.Constructors in org.bukkit.event.block with parameters of type Vector Constructor Description BlockDispenseEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull Vector velocity) -
Uses of Vector in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return Vector Modifier and Type Method Description @NotNull VectorEntityPortalExitEvent. getAfter()Gets a copy of the velocity that the entity will have after exiting the portal.@NotNull VectorEntityPortalExitEvent. getBefore()Gets a copy of the velocity that the entity has before entering the portal.Methods in org.bukkit.event.entity with parameters of type Vector Modifier and Type Method Description voidEntityPortalExitEvent. setAfter(@NotNull Vector after)Sets the velocity that the entity will have after exiting the portal.Constructors in org.bukkit.event.entity with parameters of type Vector Constructor Description EntityPortalExitEvent(@NotNull Entity entity, @NotNull Location from, @NotNull Location to, @NotNull Vector before, @NotNull Vector after) -
Uses of Vector in org.bukkit.event.player
Methods in org.bukkit.event.player that return Vector Modifier and Type Method Description @NotNull VectorPlayerInteractAtEntityEvent. getClickedPosition()@NotNull VectorPlayerVelocityEvent. getVelocity()Gets the velocity vector that will be sent to the playerMethods in org.bukkit.event.player with parameters of type Vector Modifier and Type Method Description voidPlayerVelocityEvent. setVelocity(@NotNull Vector velocity)Sets the velocity vector that will be sent to the playerConstructors in org.bukkit.event.player with parameters of type Vector Constructor Description PlayerInteractAtEntityEvent(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull Vector position)PlayerInteractAtEntityEvent(@NotNull Player who, @NotNull Entity clickedEntity, @NotNull Vector position, @NotNull EquipmentSlot hand)PlayerVelocityEvent(@NotNull Player player, @NotNull Vector velocity) -
Uses of Vector in org.bukkit.projectiles
Methods in org.bukkit.projectiles with parameters of type Vector Modifier and Type Method Description <T extends Projectile>
TProjectileSource. launchProjectile(@NotNull Class<? extends T> projectile, @Nullable Vector velocity)Launches aProjectilefrom the ProjectileSource with an initial velocity. -
Uses of Vector in org.bukkit.util
Subclasses of Vector in org.bukkit.util Modifier and Type Class Description classBlockVectorA vector with a hash function that floors the X, Y, Z components, a la BlockVector in WorldEdit.Methods in org.bukkit.util that return Vector Modifier and Type Method Description @NotNull VectorVector. add(@NotNull Vector vec)Adds a vector to this one@NotNull VectorVector. clone()Get a new vector.@NotNull VectorVector. copy(@NotNull Vector vec)Copies another vector@NotNull VectorVector. crossProduct(@NotNull Vector o)Calculates the cross product of this vector with another.static @NotNull VectorVector. deserialize(@NotNull Map<String,Object> args)@NotNull VectorVector. divide(@NotNull Vector vec)Divides the vector by another.@NotNull VectorBoundingBox. getCenter()Gets the center of the bounding box.@NotNull VectorVector. getCrossProduct(@NotNull Vector o)Calculates the cross product of this vector with another without mutating the original.@NotNull VectorRayTraceResult. getHitPosition()Gets the exact position of the hit.@NotNull VectorBoundingBox. getMax()Gets the maximum corner as vector.static @NotNull VectorVector. getMaximum(@NotNull Vector v1, @NotNull Vector v2)Gets the maximum components of two vectors.@NotNull VectorVector. getMidpoint(@NotNull Vector other)Gets a new midpoint vector between this vector and another.@NotNull VectorBoundingBox. getMin()Gets the minimum corner as vector.static @NotNull VectorVector. getMinimum(@NotNull Vector v1, @NotNull Vector v2)Gets the minimum components of two vectors.static @NotNull VectorVector. getRandom()Gets a random vector with components having a random value between 0 and 1.@NotNull VectorVector. midpoint(@NotNull Vector other)Sets this vector to the midpoint between this vector and another.@NotNull VectorVector. multiply(double m)Performs scalar multiplication, multiplying all components with a scalar.@NotNull VectorVector. multiply(float m)Performs scalar multiplication, multiplying all components with a scalar.@NotNull VectorVector. multiply(int m)Performs scalar multiplication, multiplying all components with a scalar.@NotNull VectorVector. multiply(@NotNull Vector vec)Multiplies the vector by another.@NotNull VectorVector. normalize()Converts this vector to a unit vector (a vector with length of 1).@NotNull VectorVector. rotateAroundAxis(@NotNull Vector axis, double angle)Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull VectorVector. rotateAroundNonUnitAxis(@NotNull Vector axis, double angle)Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull VectorVector. rotateAroundX(double angle)Rotates the vector around the x axis.@NotNull VectorVector. rotateAroundY(double angle)Rotates the vector around the y axis.@NotNull VectorVector. rotateAroundZ(double angle)Rotates the vector around the z axis@NotNull VectorVector. setX(double x)Set the X component.@NotNull VectorVector. setX(float x)Set the X component.@NotNull VectorVector. setX(int x)Set the X component.@NotNull VectorVector. setY(double y)Set the Y component.@NotNull VectorVector. setY(float y)Set the Y component.@NotNull VectorVector. setY(int y)Set the Y component.@NotNull VectorVector. setZ(double z)Set the Z component.@NotNull VectorVector. setZ(float z)Set the Z component.@NotNull VectorVector. setZ(int z)Set the Z component.@NotNull VectorVector. subtract(@NotNull Vector vec)Subtracts a vector from this one.@NotNull VectorVector. zero()Zero this vector's components.Methods in org.bukkit.util with parameters of type Vector Modifier and Type Method Description @NotNull VectorVector. add(@NotNull Vector vec)Adds a vector to this onefloatVector. angle(@NotNull Vector other)Gets the angle between this vector and another in radians.booleanBoundingBox. contains(@NotNull Vector position)Checks if this bounding box contains the specified position.booleanBoundingBox. contains(@NotNull Vector min, @NotNull Vector max)Checks if this bounding box fully contains the bounding box that is defined by the given corners.@NotNull VectorVector. copy(@NotNull Vector vec)Copies another vector@NotNull VectorVector. crossProduct(@NotNull Vector o)Calculates the cross product of this vector with another.doubleVector. distance(@NotNull Vector o)Get the distance between this vector and another.doubleVector. distanceSquared(@NotNull Vector o)Get the squared distance between this vector and another.@NotNull VectorVector. divide(@NotNull Vector vec)Divides the vector by another.doubleVector. dot(@NotNull Vector other)Calculates the dot product of this vector with another.@NotNull BoundingBoxBoundingBox. expand(@NotNull Vector expansion)Expands this bounding box uniformly by the given values in both positive and negative directions.@NotNull BoundingBoxBoundingBox. expand(@NotNull Vector direction, double expansion)Expands this bounding box in the specified direction.@NotNull BoundingBoxBoundingBox. expandDirectional(@NotNull Vector direction)Expands this bounding box in the specified direction.@NotNull VectorVector. getCrossProduct(@NotNull Vector o)Calculates the cross product of this vector with another without mutating the original.static @NotNull VectorVector. getMaximum(@NotNull Vector v1, @NotNull Vector v2)Gets the maximum components of two vectors.@NotNull VectorVector. getMidpoint(@NotNull Vector other)Gets a new midpoint vector between this vector and another.static @NotNull VectorVector. getMinimum(@NotNull Vector v1, @NotNull Vector v2)Gets the minimum components of two vectors.booleanVector. isInAABB(@NotNull Vector min, @NotNull Vector max)Returns whether this vector is in an axis-aligned bounding box.booleanVector. isInSphere(@NotNull Vector origin, double radius)Returns whether this vector is within a sphere.@NotNull VectorVector. midpoint(@NotNull Vector other)Sets this vector to the midpoint between this vector and another.@NotNull VectorVector. multiply(@NotNull Vector vec)Multiplies the vector by another.static @NotNull BoundingBoxBoundingBox. of(@NotNull Vector center, double x, double y, double z)Creates a new bounding box using the given center and extents.static @NotNull BoundingBoxBoundingBox. of(@NotNull Vector corner1, @NotNull Vector corner2)Creates a new bounding box using the coordinates of the given vectors as corners.booleanBoundingBox. overlaps(@NotNull Vector min, @NotNull Vector max)Checks if this bounding box overlaps with the bounding box that is defined by the given corners.@Nullable RayTraceResultBoundingBox. rayTrace(@NotNull Vector start, @NotNull Vector direction, double maxDistance)Calculates the intersection of this bounding box with the specified line segment.@NotNull VectorVector. rotateAroundAxis(@NotNull Vector axis, double angle)Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull VectorVector. rotateAroundNonUnitAxis(@NotNull Vector axis, double angle)Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull BoundingBoxBoundingBox. shift(@NotNull Vector shift)Shifts this bounding box by the given amounts.@NotNull VectorVector. subtract(@NotNull Vector vec)Subtracts a vector from this one.@NotNull BoundingBoxBoundingBox. union(@NotNull Vector position)Expands this bounding box to contain (or border) the specified position.Constructors in org.bukkit.util with parameters of type Vector Constructor Description BlockIterator(@NotNull World world, @NotNull Vector start, @NotNull Vector direction, double yOffset, int maxDistance)Constructs the BlockIterator.BlockVector(@NotNull Vector vec)Construct the vector with another vector.RayTraceResult(@NotNull Vector hitPosition)Creates a RayTraceResult.RayTraceResult(@NotNull Vector hitPosition, @Nullable BlockFace hitBlockFace)Creates a RayTraceResult.RayTraceResult(@NotNull Vector hitPosition, @Nullable Block hitBlock, @Nullable BlockFace hitBlockFace)Creates a RayTraceResult.RayTraceResult(@NotNull Vector hitPosition, @Nullable Entity hitEntity)Creates a RayTraceResult.RayTraceResult(@NotNull Vector hitPosition, @Nullable Entity hitEntity, @Nullable BlockFace hitBlockFace)Creates a RayTraceResult.
-