2
0
Эх сурвалжийг харах

Added javadoc for Misc.getBlockCenter(BlockState)

And camel-cased the parameter name to conform to style.
Sid 9 жил өмнө
parent
commit
4cb4a6224b

+ 7 - 1
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);
         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);
         return blockstate.getLocation().add(0.5, 0.5, 0.5);
     }
     }