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 VectorTargetEntityInfo.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, ornullif 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 TypeMethodDescriptionvoidEntityPushedByEntityAttackEvent.setAcceleration(Vector acceleration) Deprecated, for removal: This API element is subject to removal in a future version.voidEntityKnockbackEvent.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 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 VectorModifier and TypeMethodDescription@NotNull LocationAdds the location by a vector.@Nullable RayTraceResultWorld.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 RayTraceResultWorld.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 RayTraceResultWorld.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 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.default @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.default @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 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 RayTraceResultWorld.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResultWorld.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize) Performs a ray trace that checks for entity collisions.default @Nullable RayTraceResultWorld.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 RayTraceResultWorld.rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, @Nullable Predicate<? super Entity> filter) Performs a ray trace that checks for entity collisions.voidWorld.sendGameEvent(@Nullable Entity sourceEntity, @NotNull GameEvent gameEvent, @NotNull Vector position) Posts a specified game event at a location@NotNull LocationLocation.setDirection(@NotNull Vector vector) default @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 LocationSubtracts the location by a vector. -
Uses of Vector in org.bukkit.block
Methods in org.bukkit.block that return VectorModifier and TypeMethodDescription@NotNull VectorBlockFace.getDirection()Gets the normal vector corresponding to this block face.Methods in org.bukkit.block with parameters of type VectorModifier and TypeMethodDescriptionintGets 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 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 VectorModifier and TypeMethodDescription@Nullable VectorGets the requested Vector by path.@Nullable VectorGets the requestedVectorby path, returning a default value if not found.@Nullable Vector@Nullable VectorMethods 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 VectorFireball.getAcceleration()Retrieve the acceleration of this fireball.@NotNull VectorMinecart.getDerailedVelocityMod()Gets the derailed velocity modifier.@NotNull VectorFireball.getDirection()Deprecated.badly named method, returns the value ofFireball.getAcceleration()@NotNull VectorMinecart.getFlyingVelocityMod()Gets the flying velocity modifier.@NotNull VectorFireball.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 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 VectorModifier and TypeMethodDescriptionvoidMakes this projectile hit a specific entity from a specific point.voidFireball.setAcceleration(@NotNull Vector acceleration) Sets the acceleration of the fireball.voidMinecart.setDerailedVelocityMod(@NotNull Vector derailed) Sets the derailed velocity modifier.voidFireball.setDirection(@NotNull Vector direction) Sets the direction the fireball should be flying towards.voidMinecart.setFlyingVelocityMod(@NotNull Vector flying) Sets the flying velocity modifier.voidDeprecated.use #setAcceleration(Vector) instead.voidShulkerBullet.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.voidEntity.setVelocity(@NotNull Vector velocity) Sets this entity's velocity in meters per tickvoidVehicle.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 VectorBlockDispenseEvent.getVelocity()Gets the velocity in meters per tick.Methods in org.bukkit.event.block with parameters of type VectorModifier and TypeMethodDescriptionvoidBlockDispenseEvent.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 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.@NotNull VectorEntityKnockbackEvent.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 VectorEntityKnockbackEvent.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 TypeMethodDescriptionvoidSets the velocity that the entity will have after exiting the portal.voidEntityKnockbackEvent.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 VectorPlayerInteractAtEntityEvent.getClickedPosition()@Nullable VectorPlayerInteractEvent.getClickedPosition()Deprecated.misleading, usePlayerInteractEvent.getInteractionPoint()@NotNull VectorPlayerRiptideEvent.getVelocity()Get the velocity applied to the player as a result of this riptide.@NotNull VectorPlayerVelocityEvent.getVelocity()Gets the velocity vector that will be sent to the playerMethods in org.bukkit.event.player with parameters of type VectorModifier and TypeMethodDescriptionvoidPlayerVelocityEvent.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 VectorVehicleBlockCollisionEvent.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 BlockDataLimitedRegion.getBlockData(@NotNull Vector vector) Gets theBlockDataof the block at the provided coordinates.default @NotNull BlockStateLimitedRegion.getBlockState(@NotNull Vector location) Gets theBlockStateat a location.default voidLimitedRegion.scheduleBlockUpdate(@NotNull Vector location) Schedules a block update at a vector location.default voidLimitedRegion.scheduleFluidUpdate(@NotNull Vector location) Schedules a fluid update at a vector location.default voidLimitedRegion.setBlockData(@NotNull Vector vector, @NotNull BlockData data) Sets the block at a vector location to the providedBlockData.default voidLimitedRegion.setBlockState(@NotNull Vector location, @NotNull BlockState state) Sets theBlockStateat 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 aProjectilefrom 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 aProjectilefrom 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 TypeClassDescriptionclassA 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 VectorAdds a vector to this one@NotNull VectorVector.clone()Get a new vector.@NotNull VectorCopies 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 VectorDivides the vector by another.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3d vector) Gets a vector with components that match the provided JOMLVector3d.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3dc vector) Gets a vector with components that match the provided JOMLVector3dc.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3f vector) Gets a vector with components that match the provided JOMLVector3f.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3fc vector) Gets a vector with components that match the provided JOMLVector3fc.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3i vector) Gets a vector with components that match the provided JOMLVector3i.static @NotNull VectorVector.fromJOML(@NotNull org.joml.Vector3ic vector) Gets a vector with components that match the provided JOMLVector3ic.@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 VectorSets 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 VectorMultiplies 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 VectorSubtracts a vector from this one.@NotNull VectorVector.zero()Zero this vector's components.Methods in org.bukkit.util with parameters of type VectorModifier and TypeMethodDescription@NotNull VectorAdds a vector to this onefloatGets the angle between this vector and another in radians.booleanChecks if this bounding box contains the specified position.booleanChecks if this bounding box fully contains the bounding box that is defined by the given corners.@NotNull VectorCopies another vector@NotNull VectorVector.crossProduct(@NotNull Vector o) Calculates the cross product of this vector with another.doubleGet the distance between this vector and another.doubleVector.distanceSquared(@NotNull Vector o) Get the squared distance between this vector and another.@NotNull VectorDivides the vector by another.doubleCalculates the dot product of this vector with another.@NotNull BoundingBoxExpands this bounding box uniformly by the given values in both positive and negative directions.@NotNull BoundingBoxExpands 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.booleanReturns 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 VectorSets this vector to the midpoint between this vector and another.@NotNull VectorMultiplies the vector by another.static @NotNull BoundingBoxCreates a new bounding box using the given center and extents.static @NotNull BoundingBoxCreates a new bounding box using the coordinates of the given vectors as corners.booleanChecks if this bounding box overlaps with the bounding box that is defined by the given corners.@Nullable RayTraceResultCalculates 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 BoundingBoxShifts this bounding box by the given amounts.@NotNull VectorSubtracts a vector from this one.@NotNull BoundingBoxExpands 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()