Package net.bitbylogic.packetblocks.util
Class BoundingBoxes
java.lang.Object
net.bitbylogic.packetblocks.util.BoundingBoxes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.util.BoundingBox
getBox
(@NonNull org.bukkit.Material material) Retrieves theBoundingBox
associated with the specifiedMaterial
.static org.bukkit.util.BoundingBox
getBoxAt
(@NonNull org.bukkit.Material material, @NonNull org.bukkit.Location location) Retrieves aBoundingBox
at the specified location for the given material.static void
init
(@NonNull PacketBlocks plugin)
-
Constructor Details
-
BoundingBoxes
public BoundingBoxes()
-
-
Method Details
-
init
-
getBox
public static org.bukkit.util.BoundingBox getBox(@NonNull @NonNull org.bukkit.Material material) Retrieves theBoundingBox
associated with the specifiedMaterial
.- Parameters:
material
- the material for which the bounding box needs to be retrieved; must not be null- Returns:
- the bounding box corresponding to the given material, or null if no bounding box is defined
-
getBoxAt
public static org.bukkit.util.BoundingBox getBoxAt(@NonNull @NonNull org.bukkit.Material material, @NonNull @NonNull org.bukkit.Location location) Retrieves aBoundingBox
at the specified location for the given material. The method shifts the bounding box of the material to align it with the block location. If the material does not have a bounding box defined, the method returns null.- Parameters:
material
- the material whose bounding box is to be retrieved, must not be nulllocation
- the location where the bounding box is to be positioned, must not be null- Returns:
- the bounding box of the material at the specified location, or null if the material does not have a bounding box
-