Added javadoc for Misc.getBlockCenter(BlockState)

And camel-cased the parameter name to conform to style.
This commit is contained in:
Sid 2016-03-16 15:47:24 -05:00
parent a6e445b7ef
commit 4cb4a6224b

View File

@ -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);
}