*
* @param block to check it nearby of
* @return True if it is raining, False if not
*/
public static boolean hasRainNearby(Block block) {
Sky sky = block.getWorld().get(Sky.class);
if (sky != null && sky.hasWeather()) {
if (sky.getWeatherSimulator().isRainingAt(block.getX(), block.getY(), block.getZ(), false)) {
for (BlockFace face : BlockFaces.NESW) {
if (block.translate(face).isAtSurface()) {
return true;
}
}