# 类的使用
org.bukkit.util.BoundingBox

使用BoundingBox的程序包
程序包
说明
org.bukkit
Bukkit API的顶级程序包, 包含通用的API类和接口.
org.bukkit.block
用于操作在`世界`内的三位像素(方块)，包括一些特定的状态.
org.bukkit.entity
为在`世界`内存在的非三维像素单位(实体)提供的接口，包含玩家、怪物、抛射物等.
org.bukkit.event.world
与`世界`状态和变化有关的`事件`.
org.bukkit.generator.structure
Classes to facilitate world `Structure` generation.
org.bukkit.util
提供多种目的和单一目的的类以简化各种编程概念.

- ## org.bukkit中BoundingBox的使用

  参数类型为BoundingBox的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Collection<Chunk>`
  World.`getIntersectingChunks(@NotNull BoundingBox box)`
  Gets all Chunks intersecting the given BoundingBox.
  `@NotNull Collection<Entity>`
  World.`getNearbyEntities(@NotNull BoundingBox boundingBox)`
  Returns a list of entities within the given bounding box.
  `@NotNull Collection<Entity>`
  World.`getNearbyEntities(@NotNull BoundingBox boundingBox, @Nullable Predicate<? super Entity> filter)`
  Returns a list of entities within the given bounding box.

- ## org.bukkit.block中BoundingBox的使用

  返回BoundingBox的org.bukkit.block中的方法
  修饰符和类型
  方法
  说明
  `@NotNull BoundingBox`
  Block.`getBoundingBox()`
  Gets the approximate bounding box for this block.
  `@NotNull BoundingBox`
  Conduit.`getHuntingArea()`
  Get a `BoundingBox` (relative to real-world coordinates) in which the conduit will search for hostile entities to target.

- ## org.bukkit.entity中BoundingBox的使用

  返回BoundingBox的org.bukkit.entity中的方法
  修饰符和类型
  方法
  说明
  `@NotNull BoundingBox`
  Entity.`getBoundingBox()`
  Gets the entity's current bounding box.

- ## org.bukkit.event.world中BoundingBox的使用

  返回BoundingBox的org.bukkit.event.world中的方法
  修饰符和类型
  方法
  说明
  `@NotNull BoundingBox`
  AsyncStructureGenerateEvent.`getBoundingBox()`
  Get the bounding box of the structure.
  `@NotNull BoundingBox`
  AsyncStructureSpawnEvent.`getBoundingBox()`
  Get the bounding box of the structure.
  参数类型为BoundingBox的org.bukkit.event.world中的构造器
  限定符
  构造器
  说明
  ``
  `AsyncStructureGenerateEvent(@NotNull World world, boolean async, @NotNull AsyncStructureGenerateEvent.Cause cause, @NotNull Structure structure, @NotNull BoundingBox boundingBox, int chunkX, int chunkZ)`
  ``
  `AsyncStructureSpawnEvent(@NotNull World world, @NotNull Structure structure, @NotNull BoundingBox boundingBox, int chunkX, int chunkZ)`

- ## org.bukkit.generator.structure中BoundingBox的使用

  返回BoundingBox的org.bukkit.generator.structure中的方法
  修饰符和类型
  方法
  说明
  `@NotNull BoundingBox`
  GeneratedStructure.`getBoundingBox()`
  Gets the bounding box of this placed structure.
  `@NotNull BoundingBox`
  StructurePiece.`getBoundingBox()`
  Gets the bounding box of this structure piece.

- ## org.bukkit.util中BoundingBox的使用

  返回BoundingBox的org.bukkit.util中的方法
  修饰符和类型
  方法
  说明
  `@NotNull BoundingBox`
  BoundingBox.`clone()`
  Creates a copy of this bounding box.
  `@NotNull BoundingBox`
  BoundingBox.`copy(@NotNull BoundingBox other)`
  Copies another bounding box.
  `static @NotNull BoundingBox`
  BoundingBox.`deserialize(@NotNull Map<String,Object> args)`
  `@NotNull BoundingBox`
  BoundingBox.`expand(double expansion)`
  Expands this bounding box uniformly by the given value in all directions.
  `@NotNull BoundingBox`
  BoundingBox.`expand(double x, double y, double z)`
  Expands this bounding box uniformly by the given values in both positive and negative directions.
  `@NotNull BoundingBox`
  BoundingBox.`expand(double dirX, double dirY, double dirZ, double expansion)`
  Expands this bounding box in the specified direction.
  `@NotNull BoundingBox`
  BoundingBox.`expand(double negativeX, double negativeY, double negativeZ, double positiveX, double positiveY, double positiveZ)`
  Expands this bounding box by the given values in the corresponding directions.
  `@NotNull BoundingBox`
  BoundingBox.`expand(@NotNull BlockFace blockFace, double expansion)`
  Expands this bounding box in the direction specified by the given block face.
  `@NotNull BoundingBox`
  BoundingBox.`expand(@NotNull Vector expansion)`
  Expands this bounding box uniformly by the given values in both positive and negative directions.
  `@NotNull BoundingBox`
  BoundingBox.`expand(@NotNull Vector direction, double expansion)`
  Expands this bounding box in the specified direction.
  `@NotNull BoundingBox`
  BoundingBox.`expandDirectional(double dirX, double dirY, double dirZ)`
  Expands this bounding box in the specified direction.
  `@NotNull BoundingBox`
  BoundingBox.`expandDirectional(@NotNull Vector direction)`
  Expands this bounding box in the specified direction.
  `@NotNull BoundingBox`
  BoundingBox.`intersection(@NotNull BoundingBox other)`
  Resizes this bounding box to represent the intersection of this and the given bounding box.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Block block)`
  Creates a new 1x1x1 sized bounding box containing the given block.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Block corner1, @NotNull Block corner2)`
  Creates a new bounding box using the coordinates of the given blocks as corners.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Location center, double x, double y, double z)`
  Creates a new bounding box using the given center and extents.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Location corner1, @NotNull Location corner2)`
  Creates a new bounding box using the coordinates of the given locations as corners.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Vector center, double x, double y, double z)`
  Creates a new bounding box using the given center and extents.
  `static @NotNull BoundingBox`
  BoundingBox.`of(@NotNull Vector corner1, @NotNull Vector corner2)`
  Creates a new bounding box using the coordinates of the given vectors as corners.
  `@NotNull BoundingBox`
  BoundingBox.`resize(double x1, double y1, double z1, double x2, double y2, double z2)`
  Resizes this bounding box.
  `@NotNull BoundingBox`
  BoundingBox.`shift(double shiftX, double shiftY, double shiftZ)`
  Shifts this bounding box by the given amounts.
  `@NotNull BoundingBox`
  BoundingBox.`shift(@NotNull Location shift)`
  Shifts this bounding box by the given amounts.
  `@NotNull BoundingBox`
  BoundingBox.`shift(@NotNull Vector shift)`
  Shifts this bounding box by the given amounts.
  `@NotNull BoundingBox`
  BoundingBox.`union(double posX, double posY, double posZ)`
  Expands this bounding box to contain (or border) the specified position.
  `@NotNull BoundingBox`
  BoundingBox.`union(@NotNull Location position)`
  Expands this bounding box to contain (or border) the specified position.
  `@NotNull BoundingBox`
  BoundingBox.`union(@NotNull BoundingBox other)`
  Expands this bounding box to contain both this and the given bounding box.
  `@NotNull BoundingBox`
  BoundingBox.`union(@NotNull Vector position)`
  Expands this bounding box to contain (or border) the specified position.
  返回变量类型为BoundingBox的类型的org.bukkit.util中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Collection<BoundingBox>`
  VoxelShape.`getBoundingBoxes()`
  Converts this shape into a collection of `BoundingBox` equivalent to the shape: a bounding box intersects with this block shape if it intersects with any of the shape's bounding boxes.
  参数类型为BoundingBox的org.bukkit.util中的方法
  修饰符和类型
  方法
  说明
  `boolean`
  BoundingBox.`contains(@NotNull BoundingBox other)`
  Checks if this bounding box fully contains the given bounding box.
  `@NotNull BoundingBox`
  BoundingBox.`copy(@NotNull BoundingBox other)`
  Copies another bounding box.
  `@NotNull BoundingBox`
  BoundingBox.`intersection(@NotNull BoundingBox other)`
  Resizes this bounding box to represent the intersection of this and the given bounding box.
  `boolean`
  BoundingBox.`overlaps(@NotNull BoundingBox other)`
  Checks if this bounding box overlaps with the given bounding box.
  `boolean`
  VoxelShape.`overlaps(@NotNull BoundingBox other)`
  Checks if the given bounding box intersects this block shape.
  `@NotNull BoundingBox`
  BoundingBox.`union(@NotNull BoundingBox other)`
  Expands this bounding box to contain both this and the given bounding box.