public static Optional<Chunk> getLoadedChunk(World world, BlockPos pos)
	{
		if (world.getChunkProvider() == null)
			return Optional.empty();

		return Optional.ofNullable(world.getChunkProvider().getLoadedChunk(pos.getX() >> 4, pos.getZ() >> 4));
	}
public static Optional < Chunk > getLoadedChunk ( World world , BlockPos pos ) { if ( world . getChunkProvider ( ) == null ) return Optional . empty ( ) ; return Optional . ofNullable ( world . getChunkProvider ( ) . getLoadedChunk ( pos . getX ( ) > > 4 , pos . getZ ( ) > > 4 ) ) ; }
Gets an {@link Optional} for the loaded {@link Chunk} at the specified {@link BlockPos}.

@param world the world
@param pos the pos
@return the loaded chunk