Package me.c7dev.dexterity.util
Class ClickedBlockDisplay
java.lang.Object
me.c7dev.dexterity.util.ClickedBlockDisplay
-
Constructor Summary
ConstructorsConstructorDescriptionClickedBlockDisplay(org.bukkit.entity.BlockDisplay block, org.bukkit.block.BlockFace blockFace, org.bukkit.util.Vector offset, org.bukkit.Location loc, org.bukkit.Location centerLoc, org.bukkit.util.Vector up_dir, org.bukkit.util.Vector east_dir, org.bukkit.util.Vector south_dir, double dist) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.BlockDisplayThe raw display entity that was clickedorg.bukkit.block.BlockFaceWhich face of the block display was clicked, accounting for rotation of the block displayorg.bukkit.LocationRetrieves the precise location on the block face that the player clickedorg.bukkit.LocationRetrieves the center of the block display entitydoubleRetrieves the distance from the player's eye location to the block face in units of blocksorg.bukkit.util.VectorRetrieves the entity's relative east direction basis vectororg.bukkit.util.VectorRetrieves a unit vector that is perpendicular to the clicked block faceorg.bukkit.util.VectorRetrieves the vector along the plane of the block face from the center of the face to the precise location of the clickRetrieves a wrapper for the calculated roll offset, if roll is used in the block display's rotationorg.bukkit.util.VectorRetrieves the entity's relative south direction basis vectororg.bukkit.util.VectorgetUpDir()Retrieves the entity's relative up direction basis vectorvoid
-
Constructor Details
-
ClickedBlockDisplay
public ClickedBlockDisplay(org.bukkit.entity.BlockDisplay block, org.bukkit.block.BlockFace blockFace, org.bukkit.util.Vector offset, org.bukkit.Location loc, org.bukkit.Location centerLoc, org.bukkit.util.Vector up_dir, org.bukkit.util.Vector east_dir, org.bukkit.util.Vector south_dir, double dist)
-
-
Method Details
-
setRollOffset
-
getBlockDisplay
public org.bukkit.entity.BlockDisplay getBlockDisplay()The raw display entity that was clicked- Returns:
-
getBlockFace
public org.bukkit.block.BlockFace getBlockFace()Which face of the block display was clicked, accounting for rotation of the block display- Returns:
-
getOffsetFromFaceCenter
public org.bukkit.util.Vector getOffsetFromFaceCenter()Retrieves the vector along the plane of the block face from the center of the face to the precise location of the click- Returns:
- Unmodifiable vector
-
getClickLocation
public org.bukkit.Location getClickLocation()Retrieves the precise location on the block face that the player clicked- Returns:
- Unmodifiable location
-
getDisplayCenterLocation
public org.bukkit.Location getDisplayCenterLocation()Retrieves the center of the block display entity- Returns:
- Unmodifiable location
-
getNormal
public org.bukkit.util.Vector getNormal()Retrieves a unit vector that is perpendicular to the clicked block face- Returns:
- Unmodifiable unit vector
-
getUpDir
public org.bukkit.util.Vector getUpDir()Retrieves the entity's relative up direction basis vector- Returns:
- Unmodifiable unit vector
-
getEastDir
public org.bukkit.util.Vector getEastDir()Retrieves the entity's relative east direction basis vector- Returns:
- Unmodifiable unit vector
-
getSouthDir
public org.bukkit.util.Vector getSouthDir()Retrieves the entity's relative south direction basis vector- Returns:
- Unmodifiable unit vector
-
getDistance
public double getDistance()Retrieves the distance from the player's eye location to the block face in units of blocks- Returns:
-
getRollOffset
Retrieves a wrapper for the calculated roll offset, if roll is used in the block display's rotation- Returns:
-