From 4cb4a6224b2ec67ade1eb2a17c3cf09589ef4e63 Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 16 Mar 2016 15:47:24 -0500 Subject: [PATCH] Added javadoc for Misc.getBlockCenter(BlockState) And camel-cased the parameter name to conform to style. --- src/main/java/com/gmail/nossr50/util/Misc.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 02b203a5a..93337f2e4 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -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); }