Uses of Class
org.bukkit.util.Vector
Packages that use Vector
Package
Description
The root package of the Bukkit API, contains generalized API classes.
Classes used to manipulate the voxels in a
world
,
including special states.Classes dedicated to handling a plugin's runtime configuration.
Interfaces for non-voxel objects that can exist in a
world
, including all players, monsters, projectiles, etc.Events
relating to vehicular entities
.Classes to facilitate
world
generation
implementation.Classes to represent the source of a projectile
Multi and single purpose classes to facilitate various programmatic
concepts.
-
Uses of Vector in com.destroystokyo.paper.entity
Methods in com.destroystokyo.paper.entity that return VectorModifier and TypeMethodDescription@NotNull Vector
TargetEntityInfo.getHitVector()
Deprecated, for removal: This API element is subject to removal in a future version.Get the position the entity is targeted atConstructors in com.destroystokyo.paper.entity with parameters of type VectorModifierConstructorDescriptionTargetEntityInfo
(@NotNull Entity entity, @NotNull Vector hitVec) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of Vector in com.destroystokyo.paper.event.entity
Constructors in com.destroystokyo.paper.event.entity with parameters of type VectorModifierConstructorDescriptionEntityKnockbackByEntityEvent
(LivingEntity entity, Entity hitBy, EntityKnockbackEvent.Cause cause, float knockbackStrength, Vector knockback) -
Uses of Vector in com.destroystokyo.paper.event.player
Methods in com.destroystokyo.paper.event.player that return VectorModifier and TypeMethodDescriptionPlayerUseUnknownEntityEvent.getClickedRelativePosition()
Returns the position relative to the entity that was clicked, ornull
if not available.Constructors in com.destroystokyo.paper.event.player with parameters of type VectorModifierConstructorDescriptionPlayerUseUnknownEntityEvent
(Player player, int entityId, boolean attack, EquipmentSlot hand, @Nullable Vector clickedPosition) -
Uses of Vector in io.papermc.paper.block.fluid
Methods in io.papermc.paper.block.fluid that return VectorModifier and TypeMethodDescriptionFluidData.computeFlowDirection
(Location location) Computes the direction of the flow of the liquid at the given location as a vector. -
Uses of Vector in io.papermc.paper.event.entity
Fields in io.papermc.paper.event.entity declared as VectorMethods in io.papermc.paper.event.entity that return VectorModifier and TypeMethodDescriptionEntityPushedByEntityAttackEvent.getAcceleration()
Deprecated, for removal: This API element is subject to removal in a future version.EntityKnockbackEvent.getKnockback()
Gets the knockback force that will be applied to the entity.Methods in io.papermc.paper.event.entity with parameters of type VectorModifier and TypeMethodDescriptionvoid
EntityPushedByEntityAttackEvent.setAcceleration
(Vector acceleration) Deprecated, for removal: This API element is subject to removal in a future version.void
EntityKnockbackEvent.setKnockback
(Vector knockback) Sets the knockback force that will be applied to the entity.Constructors in io.papermc.paper.event.entity with parameters of type VectorModifierConstructorDescriptionEntityKnockbackEvent
(Entity entity, EntityKnockbackEvent.Cause cause, Vector knockback) EntityPushedByEntityAttackEvent
(Entity entity, EntityKnockbackEvent.Cause cause, Entity pushedBy, Vector knockback) -
Uses of Vector in io.papermc.paper.math
Methods in io.papermc.paper.math that return Vector -
Uses of Vector in io.papermc.paper.raytracing
Methods in io.papermc.paper.raytracing with parameters of type VectorModifier and TypeMethodDescriptionSets the direction. -
Uses of Vector in org.bukkit
Methods in org.bukkit that return VectorModifier and TypeMethodDescription@NotNull Vector
Location.getDirection()
Gets a unit-vector pointing in the direction that this Location is facing.@NotNull Vector
Location.toVector()
Constructs a newVector
based on this LocationMethods in org.bukkit with parameters of type VectorModifier and TypeMethodDescription@NotNull Location
Adds the location by a vector.@Nullable RayTraceResult
World.rayTrace
(@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter, @Nullable Predicate<? super Block> canCollide) Performs a ray trace that checks for both block and entity collisions.default @Nullable RayTraceResult
World.rayTrace
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for both block and entity collisions.@Nullable RayTraceResult
World.rayTraceBlocks
(@NotNull Position start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, @Nullable Predicate<? super Block> canCollide) Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.default @Nullable RayTraceResult
World.rayTraceBlocks
(@NotNull Location start, @NotNull Vector direction, double maxDistance) Performs a ray trace that checks for block collisions using the blocks' precise collision shapes.default @Nullable RayTraceResult
World.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.default @Nullable RayTraceResult
World.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 RayTraceResult
World.rayTraceEntities
(@NotNull Position start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResult
World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResult
World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResult
World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResult
World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.void
World.sendGameEvent
(@Nullable Entity sourceEntity, @NotNull GameEvent gameEvent, @NotNull Vector position) Posts a specified game event at a location@NotNull Location
Location.setDirection
(@NotNull Vector vector) default @NotNull Arrow
World.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 Location
Subtracts the location by a vector. -
Uses of Vector in org.bukkit.block
Methods in org.bukkit.block that return VectorModifier and TypeMethodDescription@NotNull Vector
BlockFace.getDirection()
Gets the normal vector corresponding to this block face.Methods in org.bukkit.block with parameters of type VectorModifier and TypeMethodDescriptionint
Gets the appropriate slot based on a vector relative to this block.
Will return -1 if the given vector is not within the bounds of any slot.@Nullable RayTraceResult
Block.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 VectorModifier and TypeMethodDescription@Nullable Vector
Gets the requested Vector by path.@Nullable Vector
Gets the requestedVector
by path, returning a default value if not found.@Nullable Vector
@Nullable Vector
Methods in org.bukkit.configuration with parameters of type Vector -
Uses of Vector in org.bukkit.entity
Methods in org.bukkit.entity that return VectorModifier and TypeMethodDescription@NotNull Vector
Fireball.getAcceleration()
Retrieve the acceleration of this fireball.@NotNull Vector
Minecart.getDerailedVelocityMod()
Gets the derailed velocity modifier.@NotNull Vector
Fireball.getDirection()
Deprecated.badly named method, returns the value ofFireball.getAcceleration()
@NotNull Vector
Minecart.getFlyingVelocityMod()
Gets the flying velocity modifier.@NotNull Vector
Fireball.getPower()
Deprecated.Use #getAcceleration instead.ShulkerBullet.getTargetDelta()
Gets the relative offset that this shulker bullet should move towards, note that this will change each tick as the skulker bullet approaches the target.@NotNull Vector
Entity.getVelocity()
Gets this entity's current velocity@NotNull Vector
Vehicle.getVelocity()
Gets the vehicle's velocity.Methods in org.bukkit.entity with parameters of type VectorModifier and TypeMethodDescriptionvoid
Makes this projectile hit a specific entity from a specific point.void
Fireball.setAcceleration
(@NotNull Vector acceleration) Sets the acceleration of the fireball.void
Minecart.setDerailedVelocityMod
(@NotNull Vector derailed) Sets the derailed velocity modifier.void
Fireball.setDirection
(@NotNull Vector direction) Sets the direction the fireball should be flying towards.void
Minecart.setFlyingVelocityMod
(@NotNull Vector flying) Sets the flying velocity modifier.void
Deprecated.use #setAcceleration(Vector) instead.void
ShulkerBullet.setTargetDelta
(Vector vector) Sets the relative offset that this shulker bullet should move towards, note that this will change each tick as the skulker bullet approaches the target.void
Entity.setVelocity
(@NotNull Vector velocity) Sets this entity's velocity in meters per tickvoid
Vehicle.setVelocity
(@NotNull Vector vel) Sets the vehicle's velocity in meters per tick. -
Uses of Vector in org.bukkit.event.block
Methods in org.bukkit.event.block that return VectorModifier and TypeMethodDescription@NotNull Vector
BlockDispenseEvent.getVelocity()
Gets the velocity in meters per tick.Methods in org.bukkit.event.block with parameters of type VectorModifier and TypeMethodDescriptionvoid
BlockDispenseEvent.setVelocity
(@NotNull Vector velocity) Sets the velocity of the item being dispensed in meters per tick.Constructors in org.bukkit.event.block with parameters of type VectorModifierConstructorDescriptionBlockDispenseEvent
(@NotNull Block block, @NotNull ItemStack item, @NotNull Vector velocity) -
Uses of Vector in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return VectorModifier and TypeMethodDescription@NotNull Vector
EntityPortalExitEvent.getAfter()
Gets a copy of the velocity that the entity will have after exiting the portal.@NotNull Vector
EntityPortalExitEvent.getBefore()
Gets a copy of the velocity that the entity has before entering the portal.@NotNull Vector
EntityKnockbackEvent.getFinalKnockback()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the force that will be applied to the entity.@NotNull Vector
EntityKnockbackEvent.getKnockback()
Deprecated, for removal: This API element is subject to removal in a future version.Gets the raw knockback force that will be applied to the entity.Methods in org.bukkit.event.entity with parameters of type VectorModifier and TypeMethodDescriptionvoid
Sets the velocity that the entity will have after exiting the portal.void
EntityKnockbackEvent.setFinalKnockback
(@NotNull Vector knockback) Deprecated, for removal: This API element is subject to removal in a future version.Sets the force that will be applied to the entity.Constructors in org.bukkit.event.entity with parameters of type VectorModifierConstructorDescriptionEntityKnockbackByEntityEvent
(@NotNull LivingEntity entity, @NotNull Entity source, @NotNull EntityKnockbackEvent.KnockbackCause cause, double force, @NotNull Vector rawKnockback, @NotNull Vector knockback) Deprecated, for removal: This API element is subject to removal in a future version.EntityKnockbackEvent
(@NotNull LivingEntity entity, @NotNull EntityKnockbackEvent.KnockbackCause cause, double force, @NotNull Vector rawKnockback, @NotNull Vector knockback) Deprecated, for removal: This API element is subject to removal in a future version.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 VectorModifier and TypeMethodDescription@NotNull Vector
PlayerInteractAtEntityEvent.getClickedPosition()
@Nullable Vector
PlayerInteractEvent.getClickedPosition()
Deprecated.misleading, usePlayerInteractEvent.getInteractionPoint()
@NotNull Vector
PlayerRiptideEvent.getVelocity()
Get the velocity applied to the player as a result of this riptide.@NotNull Vector
PlayerVelocityEvent.getVelocity()
Gets the velocity vector that will be sent to the playerMethods in org.bukkit.event.player with parameters of type VectorModifier and TypeMethodDescriptionvoid
PlayerVelocityEvent.setVelocity
(@NotNull Vector velocity) Sets the velocity vector in meters per tick that will be sent to the playerConstructors in org.bukkit.event.player with parameters of type VectorModifierConstructorDescriptionPlayerInteractAtEntityEvent
(@NotNull Player player, @NotNull Entity clickedEntity, @NotNull Vector position) PlayerInteractAtEntityEvent
(@NotNull Player player, @NotNull Entity clickedEntity, @NotNull Vector position, @NotNull EquipmentSlot hand) PlayerInteractEvent
(@NotNull Player player, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand, @Nullable Vector clickedPosition) PlayerRiptideEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull Vector velocity) PlayerVelocityEvent
(@NotNull Player player, @NotNull Vector velocity) -
Uses of Vector in org.bukkit.event.vehicle
Methods in org.bukkit.event.vehicle that return VectorModifier and TypeMethodDescription@NotNull Vector
VehicleBlockCollisionEvent.getVelocity()
Gets velocity at which the vehicle collided with the blockConstructors in org.bukkit.event.vehicle with parameters of type VectorModifierConstructorDescriptionVehicleBlockCollisionEvent
(@NotNull Vehicle vehicle, @NotNull Block block, @NotNull Vector velocity) -
Uses of Vector in org.bukkit.generator
Methods in org.bukkit.generator with parameters of type VectorModifier and TypeMethodDescriptiondefault @NotNull BlockData
LimitedRegion.getBlockData
(@NotNull Vector vector) Gets theBlockData
of the block at the provided coordinates.default @NotNull BlockState
LimitedRegion.getBlockState
(@NotNull Vector location) Gets theBlockState
at a location.default void
LimitedRegion.scheduleBlockUpdate
(@NotNull Vector location) Schedules a block update at a vector location.default void
LimitedRegion.scheduleFluidUpdate
(@NotNull Vector location) Schedules a fluid update at a vector location.default void
LimitedRegion.setBlockData
(@NotNull Vector vector, @NotNull BlockData data) Sets the block at a vector location to the providedBlockData
.default void
LimitedRegion.setBlockState
(@NotNull Vector location, @NotNull BlockState state) Sets theBlockState
at a location. -
Uses of Vector in org.bukkit.projectiles
Methods in org.bukkit.projectiles with parameters of type VectorModifier and TypeMethodDescriptiondefault <T extends Projectile>
TProjectileSource.launchProjectile
(@NotNull Class<? extends T> projectile, @Nullable Vector velocity) Launches aProjectile
from the ProjectileSource with an initial velocity.<T extends Projectile>
TProjectileSource.launchProjectile
(@NotNull Class<? extends T> projectile, @Nullable Vector velocity, @Nullable Consumer<? super T> function) Launches aProjectile
from the ProjectileSource with an initial velocity, with the supplied function run before the entity is added to the world. -
Uses of Vector in org.bukkit.util
Subclasses of Vector in org.bukkit.utilModifier and TypeClassDescriptionclass
A vector with a hash function that floors the X, Y, Z components, a la BlockVector in WorldEdit.Methods in org.bukkit.util that return VectorModifier and TypeMethodDescription@NotNull Vector
Adds a vector to this one@NotNull Vector
Vector.clone()
Get a new vector.@NotNull Vector
Copies another vector@NotNull Vector
Vector.crossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another.static @NotNull Vector
Vector.deserialize
(@NotNull Map<String, Object> args) @NotNull Vector
Divides the vector by another.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3d vector) Gets a vector with components that match the provided JOMLVector3d
.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3dc vector) Gets a vector with components that match the provided JOMLVector3dc
.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3f vector) Gets a vector with components that match the provided JOMLVector3f
.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3fc vector) Gets a vector with components that match the provided JOMLVector3fc
.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3i vector) Gets a vector with components that match the provided JOMLVector3i
.static @NotNull Vector
Vector.fromJOML
(@NotNull org.joml.Vector3ic vector) Gets a vector with components that match the provided JOMLVector3ic
.@NotNull Vector
BoundingBox.getCenter()
Gets the center of the bounding box.@NotNull Vector
Vector.getCrossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another without mutating the original.@NotNull Vector
RayTraceResult.getHitPosition()
Gets the exact position of the hit.@NotNull Vector
BoundingBox.getMax()
Gets the maximum corner as vector.static @NotNull Vector
Vector.getMaximum
(@NotNull Vector v1, @NotNull Vector v2) Gets the maximum components of two vectors.@NotNull Vector
Vector.getMidpoint
(@NotNull Vector other) Gets a new midpoint vector between this vector and another.@NotNull Vector
BoundingBox.getMin()
Gets the minimum corner as vector.static @NotNull Vector
Vector.getMinimum
(@NotNull Vector v1, @NotNull Vector v2) Gets the minimum components of two vectors.static @NotNull Vector
Vector.getRandom()
Gets a random vector with components having a random value between 0 and 1.@NotNull Vector
Sets this vector to the midpoint between this vector and another.@NotNull Vector
Vector.multiply
(double m) Performs scalar multiplication, multiplying all components with a scalar.@NotNull Vector
Vector.multiply
(float m) Performs scalar multiplication, multiplying all components with a scalar.@NotNull Vector
Vector.multiply
(int m) Performs scalar multiplication, multiplying all components with a scalar.@NotNull Vector
Multiplies the vector by another.@NotNull Vector
Vector.normalize()
Converts this vector to a unit vector (a vector with length of 1).@NotNull Vector
Vector.rotateAroundAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull Vector
Vector.rotateAroundNonUnitAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull Vector
Vector.rotateAroundX
(double angle) Rotates the vector around the x axis.@NotNull Vector
Vector.rotateAroundY
(double angle) Rotates the vector around the y axis.@NotNull Vector
Vector.rotateAroundZ
(double angle) Rotates the vector around the z axis@NotNull Vector
Vector.setX
(double x) Set the X component.@NotNull Vector
Vector.setX
(float x) Set the X component.@NotNull Vector
Vector.setX
(int x) Set the X component.@NotNull Vector
Vector.setY
(double y) Set the Y component.@NotNull Vector
Vector.setY
(float y) Set the Y component.@NotNull Vector
Vector.setY
(int y) Set the Y component.@NotNull Vector
Vector.setZ
(double z) Set the Z component.@NotNull Vector
Vector.setZ
(float z) Set the Z component.@NotNull Vector
Vector.setZ
(int z) Set the Z component.@NotNull Vector
Subtracts a vector from this one.@NotNull Vector
Vector.zero()
Zero this vector's components.Methods in org.bukkit.util with parameters of type VectorModifier and TypeMethodDescription@NotNull Vector
Adds a vector to this onefloat
Gets the angle between this vector and another in radians.boolean
Checks if this bounding box contains the specified position.boolean
Checks if this bounding box fully contains the bounding box that is defined by the given corners.@NotNull Vector
Copies another vector@NotNull Vector
Vector.crossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another.double
Get the distance between this vector and another.double
Vector.distanceSquared
(@NotNull Vector o) Get the squared distance between this vector and another.@NotNull Vector
Divides the vector by another.double
Calculates the dot product of this vector with another.@NotNull BoundingBox
Expands this bounding box uniformly by the given values in both positive and negative directions.@NotNull BoundingBox
Expands this bounding box in the specified direction.@NotNull BoundingBox
BoundingBox.expandDirectional
(@NotNull Vector direction) Expands this bounding box in the specified direction.@NotNull Vector
Vector.getCrossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another without mutating the original.static @NotNull Vector
Vector.getMaximum
(@NotNull Vector v1, @NotNull Vector v2) Gets the maximum components of two vectors.@NotNull Vector
Vector.getMidpoint
(@NotNull Vector other) Gets a new midpoint vector between this vector and another.static @NotNull Vector
Vector.getMinimum
(@NotNull Vector v1, @NotNull Vector v2) Gets the minimum components of two vectors.boolean
Returns whether this vector is in an axis-aligned bounding box.boolean
Vector.isInSphere
(@NotNull Vector origin, double radius) Returns whether this vector is within a sphere.@NotNull Vector
Sets this vector to the midpoint between this vector and another.@NotNull Vector
Multiplies the vector by another.static @NotNull BoundingBox
Creates a new bounding box using the given center and extents.static @NotNull BoundingBox
Creates a new bounding box using the coordinates of the given vectors as corners.boolean
Checks if this bounding box overlaps with the bounding box that is defined by the given corners.@Nullable RayTraceResult
Calculates the intersection of this bounding box with the specified line segment.@NotNull Vector
Vector.rotateAroundAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull Vector
Vector.rotateAroundNonUnitAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.@NotNull BoundingBox
Shifts this bounding box by the given amounts.@NotNull Vector
Subtracts a vector from this one.@NotNull BoundingBox
Expands this bounding box to contain (or border) the specified position.Constructors in org.bukkit.util with parameters of type VectorModifierConstructorDescriptionBlockIterator
(@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.
EntityKnockbackEvent.getKnockback()