mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Added javadoc for Misc.getBlockCenter(BlockState)
And camel-cased the parameter name to conform to style.
This commit is contained in:
parent
a6e445b7ef
commit
4cb4a6224b
@ -73,7 +73,13 @@ public final class Misc {
|
||||
return (first.getWorld() == second.getWorld()) && (first.distanceSquared(second) < (maxDistance * maxDistance) || maxDistance == 0);
|
||||
}
|
||||
|
||||
public static Location getBlockCenter(BlockState blockstate) {
|
||||
/**
|
||||
* Get the center of the given block.
|
||||
*
|
||||
* @param blockState The {@link BlockState} of the block
|
||||
* @return A {@link Location} lying at the center of the block
|
||||
*/
|
||||
public static Location getBlockCenter(BlockState blockState) {
|
||||
return blockstate.getLocation().add(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user