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 TypeMethodDescriptionTargetEntityInfo.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
(@NotNull LivingEntity entity, @NotNull Entity hitBy, float knockbackStrength, @NotNull Vector acceleration) -
Uses of Vector in io.papermc.paper.event.entity
Methods in io.papermc.paper.event.entity that return VectorModifier and TypeMethodDescriptionEntityPushedByEntityAttackEvent.getAcceleration()
Gets the acceleration that will be applied to the affected entity.Constructors in io.papermc.paper.event.entity with parameters of type Vector -
Uses of Vector in io.papermc.paper.math
Methods in io.papermc.paper.math that return Vector -
Uses of Vector in org.bukkit
Methods in org.bukkit that return VectorModifier and TypeMethodDescriptionLocation.getDirection()
Gets a unit-vector pointing in the direction that this Location is facing.Location.toVector()
Constructs a newVector
based on this LocationMethods in org.bukkit with parameters of type VectorModifier and TypeMethodDescriptionAdds the location by a vector.World.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.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.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.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.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<Entity> filter) Performs a ray trace that checks for entity collisions.World.rayTraceEntities
(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<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 locationLocation.setDirection
(@NotNull Vector vector) 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
Subtracts the location by a vector. -
Uses of Vector in org.bukkit.block
Methods in org.bukkit.block that return VectorModifier and TypeMethodDescriptionBlockFace.getDirection()
Gets the normal vector corresponding to this block face.Methods in org.bukkit.block with parameters of type Vector -
Uses of Vector in org.bukkit.configuration
Methods in org.bukkit.configuration that return VectorModifier and TypeMethodDescriptionGets the requested Vector by path.Gets the requestedVector
by path, returning a default value if not found.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 TypeMethodDescriptionMinecart.getDerailedVelocityMod()
Gets the derailed velocity modifier.Fireball.getDirection()
Retrieve the direction this fireball is heading towardMinecart.getFlyingVelocityMod()
Gets the flying velocity modifier.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.Entity.getVelocity()
Gets this entity's current velocityVehicle.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
Minecart.setDerailedVelocityMod
(@NotNull Vector derailed) Sets the derailed velocity modifier.void
Fireball.setDirection
(@NotNull Vector direction) Fireballs fly straight and do not take setVelocity(...) well.void
Minecart.setFlyingVelocityMod
(@NotNull Vector flying) Sets the flying velocity modifier.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 TypeMethodDescriptionBlockDispenseEvent.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 vel) Sets the velocity of the item being dispensed in meters per tick.Constructors in org.bukkit.event.block with parameters of type Vector -
Uses of Vector in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return VectorModifier and TypeMethodDescriptionEntityPortalExitEvent.getAfter()
Gets a copy of the velocity that the entity will have after exiting the portal.EntityPortalExitEvent.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 VectorModifier and TypeMethodDescriptionvoid
Sets the velocity that the entity will have after exiting the portal.Constructors in org.bukkit.event.entity with parameters of type Vector -
Uses of Vector in org.bukkit.event.player
Methods in org.bukkit.event.player that return VectorModifier and TypeMethodDescriptionPlayerInteractAtEntityEvent.getClickedPosition()
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 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.event.vehicle
Methods in org.bukkit.event.vehicle that return VectorModifier and TypeMethodDescriptionVehicleBlockCollisionEvent.getVelocity()
Gets velocity at which the vehicle collided with the blockConstructors in org.bukkit.event.vehicle with parameters of type Vector -
Uses of Vector in org.bukkit.generator
Methods in org.bukkit.generator with parameters of type VectorModifier and TypeMethodDescriptionLimitedRegion.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 TypeMethodDescription<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, Consumer<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 TypeMethodDescriptionAdds a vector to this oneVector.clone()
Get a new vector.Copies another vectorVector.crossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another.Vector.deserialize
(@NotNull Map<String, Object> args) Divides the vector by another.BoundingBox.getCenter()
Gets the center of the bounding box.Vector.getCrossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another without mutating the original.RayTraceResult.getHitPosition()
Gets the exact position of the hit.BoundingBox.getMax()
Gets the maximum corner as vector.Vector.getMaximum
(@NotNull Vector v1, @NotNull Vector v2) Gets the maximum components of two vectors.Vector.getMidpoint
(@NotNull Vector other) Gets a new midpoint vector between this vector and another.BoundingBox.getMin()
Gets the minimum corner as vector.Vector.getMinimum
(@NotNull Vector v1, @NotNull Vector v2) Gets the minimum components of two vectors.Vector.getRandom()
Gets a random vector with components having a random value between 0 and 1.Sets this vector to the midpoint between this vector and another.Vector.multiply
(double m) Performs scalar multiplication, multiplying all components with a scalar.Vector.multiply
(float m) Performs scalar multiplication, multiplying all components with a scalar.Vector.multiply
(int m) Performs scalar multiplication, multiplying all components with a scalar.Multiplies the vector by another.Vector.normalize()
Converts this vector to a unit vector (a vector with length of 1).Vector.rotateAroundAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.Vector.rotateAroundNonUnitAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.Vector.rotateAroundX
(double angle) Rotates the vector around the x axis.Vector.rotateAroundY
(double angle) Rotates the vector around the y axis.Vector.rotateAroundZ
(double angle) Rotates the vector around the z axisVector.setX
(double x) Set the X component.Vector.setX
(float x) Set the X component.Vector.setX
(int x) Set the X component.Vector.setY
(double y) Set the Y component.Vector.setY
(float y) Set the Y component.Vector.setY
(int y) Set the Y component.Vector.setZ
(double z) Set the Z component.Vector.setZ
(float z) Set the Z component.Vector.setZ
(int z) Set the Z component.Subtracts a vector from this one.Vector.zero()
Zero this vector's components.Methods in org.bukkit.util with parameters of type VectorModifier and TypeMethodDescriptionAdds 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.Copies another vectorVector.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.Divides the vector by another.double
Calculates the dot product of this vector with another.Expands this bounding box uniformly by the given values in both positive and negative directions.Expands this bounding box in the specified direction.BoundingBox.expandDirectional
(@NotNull Vector direction) Expands this bounding box in the specified direction.Vector.getCrossProduct
(@NotNull Vector o) Calculates the cross product of this vector with another without mutating the original.Vector.getMaximum
(@NotNull Vector v1, @NotNull Vector v2) Gets the maximum components of two vectors.Vector.getMidpoint
(@NotNull Vector other) Gets a new midpoint vector between this vector and another.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.Sets this vector to the midpoint between this vector and another.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.Calculates the intersection of this bounding box with the specified line segment.Vector.rotateAroundAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.Vector.rotateAroundNonUnitAxis
(@NotNull Vector axis, double angle) Rotates the vector around a given arbitrary axis in 3 dimensional space.Shifts this bounding box by the given amounts.Subtracts a vector from this one.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.